Age | Commit message (Collapse) | Author | Files | Lines |
|
Both readelf/objdump know how to get symbol version string for dynamic
symbols. This patch extracts this functionality into a separate
function and uses it to add symbol version string to versioned symbol
names when dumping dynamic relocations.
bfd/
PR binutils/16496
* elf-bfd.h (bfd_elf_get_symbol_version_string): New.
* elf.c (bfd_elf_get_symbol_version_string): New. Extracted
from bfd_elf_print_symbol.
(bfd_elf_print_symbol): Use it.
binutils/
PR binutils/16496
* objdump.c (objdump_print_symname): Call
bfd_elf_get_symbol_version_string to get ELF symbol version
string. Append version string if needed.
* readelf.c (versioned_symbol_info): New enum.
(get_symbol_version_string): New. Extracted from
process_symbol_table.
(dump_relocations): Add a new argument to indicate if dynamic
symbol table is used. Use get_symbol_version_string to get
symbol version string for dynamic symbol. Append version string
if needed.
(process_relocs): Updated dump_relocations call.
(process_symbol_table): Use get_symbol_version_string.
ld/testsuite/
PR binutils/16496
* ld-cris/weakref3.d: Add symbol version string to versioned
symbol names in dynamic relocation.
* ld-cris/weakref4.d: Likewise.
* ld-elfvers/vers24.rd: Likewise.
* ld-elf/pr16496a.c: New file.
* ld-elf/pr16496a.map: Likewise.
* ld-elf/pr16496b.c: Likewise.
* ld-elf/pr16496b.od: Likewise.
* ld-elf/shared.exp (build_tests): Add libpr16496a.so and
libpr16496b.so tests.
|
|
On PowerPC64 ELFv2 readelf emits [<localentry>: 8] describing extra
symbol st_other bits.
* ld-elfvers/vers24.rd: Allow extra readelf output after
symbol visibility.
* ld-ifunc/ifunc.exp: Likewise.
|
|
The symbol versioning tests mix C-visible symbols and linker-visible
symbols in order to verify .symver behavior. This works for most
people, but fail for targets that have a symbol prefix. So add a
helper file with macros that expand gcc's __USER_LABEL_PREFIX__ as
necessary and convert all .symver users over to it.
Now that the tests are usable on prefixed targets, update the tests
to take into account an optional leading underscore.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
* elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
ld/testsuite/
* ld-shared/shared.exp: Run on s390*-*-linux* and x86_64-*-linux* too.
xfail tests linking non-pic code into shared libs on x86_64-*-linux*.
* ld-elfvsb/elfvsb.exp: Likewise.
* ld-elfvers/vers.exp: Likewise. Add vers24a, vers24b and vers24c
tests.
* ld-elfvers/vers3.ver: Allow VERS_2.0 to come before GLIBC_*
version.
* ld-elfvers/vers19.ver: Likewise.
* ld-elfvers/vers24a.c: New test.
* ld-elfvers/vers24b.c: New test.
* ld-elfvers/vers24c.c: New test.
* ld-elfvers/vers24.map: New test.
* ld-elfvers/vers24.rd: New test.
* lib/ld-lib.exp (run_ld_link_tests): Add optional 7th argument
cflags. If source files have .c extension, compile them first.
|