diff options
author | Alan Modra <amodra@gmail.com> | 2025-09-09 17:17:51 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-09-09 17:20:03 +0930 |
commit | 7ab2cbe8d0f857d2b5462f4748127a7a7ccfed04 (patch) | |
tree | f0c65deb9e689657536c802595a75903bef1cb96 | |
parent | 5d56bdcd71be827d575c41339c6d407fcf54ba2f (diff) | |
download | binutils-7ab2cbe8d0f857d2b5462f4748127a7a7ccfed04.zip binutils-7ab2cbe8d0f857d2b5462f4748127a7a7ccfed04.tar.gz binutils-7ab2cbe8d0f857d2b5462f4748127a7a7ccfed04.tar.bz2 |
objdump gcc_compiled and gcc2_compiled
* objdump.c (remove_useless_symbols): Deal with gcc_compiled
and gcc2_compiled here..
(compare_symbols): ..rather than here..
(disassemble_section): ..and here.
-rw-r--r-- | binutils/objdump.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index 0bea4d0..290f7e5 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1106,6 +1106,9 @@ remove_useless_symbols (asymbol **symbols, long count) if (bfd_is_und_section (sym->section) || bfd_is_com_section (sym->section)) continue; + if (strstr (sym->name, "gnu_compiled") + || strstr (sym->name, "gcc2_compiled")) + continue; *out_ptr++ = sym; } @@ -1171,18 +1174,6 @@ compare_symbols (const void *ap, const void *bp) anl = strlen (an); bnl = strlen (bn); - /* The symbols gnu_compiled and gcc2_compiled convey no real - information, so put them after other symbols with the same value. */ - af = (strstr (an, "gnu_compiled") != NULL - || strstr (an, "gcc2_compiled") != NULL); - bf = (strstr (bn, "gnu_compiled") != NULL - || strstr (bn, "gcc2_compiled") != NULL); - - if (af && ! bf) - return 1; - if (! af && bf) - return -1; - /* We use a heuristic for the file name, to try to sort it after more useful symbols. It may not work on non Unix systems, but it doesn't really matter; the only difference is precisely which @@ -4092,11 +4083,7 @@ disassemble_section (bfd *abfd, asection *section, void *inf) || sym == NULL || sym->section != section || bfd_asymbol_value (sym) > addr - || ((sym->flags & BSF_OBJECT) == 0 - && (strstr (bfd_asymbol_name (sym), "gnu_compiled") - == NULL) - && (strstr (bfd_asymbol_name (sym), "gcc2_compiled") - == NULL)) + || (sym->flags & BSF_OBJECT) == 0 || (sym->flags & BSF_FUNCTION) != 0) insns = true; else |