aboutsummaryrefslogtreecommitdiff
path: root/bfd/hppabsd-core.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-10-08 10:05:39 +1030
committerAlan Modra <amodra@gmail.com>2024-10-08 15:12:19 +1030
commit124deb310116982fbd921ab1dc83fa75a8252391 (patch)
tree8a21c057e3103c2d33e1741b483af9df64292024 /bfd/hppabsd-core.c
parentcc516199d64768b32bc4f8572ade82b4865eccfa (diff)
downloadgdb-124deb310116982fbd921ab1dc83fa75a8252391.zip
gdb-124deb310116982fbd921ab1dc83fa75a8252391.tar.gz
gdb-124deb310116982fbd921ab1dc83fa75a8252391.tar.bz2
Revised "Don't return (null) from bfd_elf_sym_name"
Commit 68bbe1183379 results in a lot of follow up work, much of which likely is still to be done. (And yes, since this is all for corrupted or fuzzed object files, a whole lot of work doesn't much benefit anyone. It was a bad idea to put NULL in asymbol->name.) So I'm changing the approach to instead put a unique empty string for symbols with a corrupted st_name. An empty string won't require much work to ensure nm, objcopy, objdump etc. won't crash, since these tools already must work with unnamed local symbols. The unique empty string is called bfd_symbol_error_name. This patch uses that name string for corrupted symbols in the ELF and COFF backends. Such symbols are displayed by nm and objdump as the translated string "<corrupt>", which is what the COFF backend used to put directly into corrupted symbols. ie. it's the way I should have written the original patch, plus a few tides and cleanups I retained from the reverted patches.
Diffstat (limited to 'bfd/hppabsd-core.c')
0 files changed, 0 insertions, 0 deletions