[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1e3e896fe04c5b4db32152ea4b7966ac22745f9d.1592510545.git.mhelsley@vmware.com>
Date: Thu, 18 Jun 2020 13:38:23 -0700
From: Matt Helsley <mhelsley@...are.com>
To: <linux-kernel@...r.kernel.org>
CC: Josh Poimboeuf <jpoimboe@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Julien Thierry <jthierry@...hat.com>,
Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
Matt Helsley <mhelsley@...are.com>
Subject: [RFC][PATCH v5 37/51] objtool: mcount: Simplify mcount name matching
Setting altmcount only when processing ARM ELF files is
not necessary -- we can make the code easier to read
by always checking for the string.
Signed-off-by: Matt Helsley <mhelsley@...are.com>
---
tools/objtool/mcount.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/objtool/mcount.c b/tools/objtool/mcount.c
index ff52697613b1..7e621769c488 100644
--- a/tools/objtool/mcount.c
+++ b/tools/objtool/mcount.c
@@ -44,7 +44,6 @@
#define R_ARM_THM_CALL 10
static char gpfx; /* prefix for global symbol name (sometimes '_') */
-static const char *altmcount; /* alternate mcount symbol name */
extern int warn_on_notrace_sect; /* warn when section has mcount not being recorded */
static struct elf *lf;
@@ -173,7 +172,7 @@ static struct symbol *get_mcount_sym(struct reloc *reloc)
if (symname[0] == '.')
++symname; /* ppc64 hack */
if (strcmp(mcount, symname) == 0 ||
- (altmcount && strcmp(altmcount, symname) == 0) ||
+ (strcmp("__gnu_mcount_nc", symname) == 0) ||
(strcmp(fentry, symname) == 0))
return sym;
return NULL;
@@ -567,7 +566,6 @@ static int do_file(char const *const fname)
break;
case EM_ARM:
reltype = R_ARM_ABS32;
- altmcount = "__gnu_mcount_nc";
make_nop = make_nop_arm;
rel_type_nop = R_ARM_NONE;
is_fake_mcount = arm_is_fake_mcount;
--
2.20.1
Powered by blists - more mailing lists