diff options
author | Chris Kuethe <ckuethe@cvs.openbsd.org> | 2007-01-09 15:13:38 +0000 |
---|---|---|
committer | Chris Kuethe <ckuethe@cvs.openbsd.org> | 2007-01-09 15:13:38 +0000 |
commit | 2a9dc08daaa0aacb9cca6e61c996df04a91c2f3b (patch) | |
tree | aeec68f27ba49c660b8999f1d7666ba82b80ccc3 /usr.bin/gprof/elf.c | |
parent | 51c09eb85b4de37f1ce137f1181451ae1de4dc53 (diff) |
Ignore "mapping symbols" like $a and $t. They seem to be an ARM-only
feature, used to indicate whether code is ARM or Thumb. Unfortunately
they confuse gprof, which outputs call graphs where every other function
is named "$a"... not very useful.
Rather than enumerating the different symbols, binutils ignores anything
beginning with '$', and that is what we will do here.
Thanks to Dale Rahn for useful tips along the way.
ok miod
Diffstat (limited to 'usr.bin/gprof/elf.c')
-rw-r--r-- | usr.bin/gprof/elf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.bin/gprof/elf.c b/usr.bin/gprof/elf.c index 35330312725..5a2381325c9 100644 --- a/usr.bin/gprof/elf.c +++ b/usr.bin/gprof/elf.c @@ -144,5 +144,14 @@ wantsym(const Elf_Sym *sym, const char *strtab) #endif return 0; +#ifdef __arm__ + /* ignore what gas calls "mapping symbols" */ + { + const char *c = strtab + sym->st_name; + if (c[0] == '$') + return 0; + } +#endif + return 1; } |