diff options
Diffstat (limited to 'scripts/recordmcount.h')
-rw-r--r-- | scripts/recordmcount.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index 2e7793735e14..47fca2c69a73 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * recordmcount.h * @@ -15,8 +16,6 @@ * * This conversion to macros was done by: * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc. - * - * Licensed under the GNU General Public License, version 2 (GPLv2). */ #undef append_func #undef is_fake_mcount @@ -326,7 +325,8 @@ static uint_t *sift_rel_mcount(uint_t *mlocp, if (!mcountsym) mcountsym = get_mcountsym(sym0, relp, str0); - if (mcountsym == Elf_r_sym(relp) && !is_fake_mcount(relp)) { + if (mcountsym && mcountsym == Elf_r_sym(relp) && + !is_fake_mcount(relp)) { uint_t const addend = _w(_w(relp->r_offset) - recval + mcount_adjust); mrelp->r_offset = _w(offbase |