aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-10-14 13:51:19 +1030
committerAlan Modra <amodra@gmail.com>2019-10-14 16:47:13 +1030
commit3a3f4bf76a4790e81ee186ea76731a7f67dba1c8 (patch)
tree96600b9d8a31fed33b8736b59eb0807963f09e05 /gdb/ada-lang.c
parent48db3297342d798e58a00771a67b9b4c93412920 (diff)
downloadbinutils-3a3f4bf76a4790e81ee186ea76731a7f67dba1c8.zip
binutils-3a3f4bf76a4790e81ee186ea76731a7f67dba1c8.tar.gz
binutils-3a3f4bf76a4790e81ee186ea76731a7f67dba1c8.tar.bz2
qsort: elf_link_add_object_symbols weak aliases
This particular sort almost certainly does not need to be stable for the ELF linker to work correctly. However it is conceivable that an unstable sort could affect linker output, and thus different output be seen with differing qsort implementations. The argument goes like this: Given more than one strong alias symbol of equal section, value, and size, the aliases will compare equal by elf_sort_symbol and thus which one is chosen as the "real" symbol to be made dynamic depends on qsort. Why would anyone define two symbols at the same address? Well, sometimes the fact that there are more than one strong alias symbol is due to linker script symbols like __bss_start being made dynamic. This will match the first symbol defined in .bss if it doesn't have correct size, and forgetting to properly set size and type of symbols isn't as rare as it should be. This patch adds some more heuristics to elf_sort_symbol. * elflink.c (elf_sort_symbol): Sort on type and name as well. (elf_link_add_object_symbols): Style fix.
Diffstat (limited to 'gdb/ada-lang.c')
0 files changed, 0 insertions, 0 deletions