mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
e20365c5d0
Before binutils 2.26, -Bsymbolic and -Bsymbolic-functions were also applied to PIE so that "ld -pie -Bsymbolic -E" can be used to export symbols in PIE with local binding. This patch re-enables -Bsymbolic and -Bsymbolic-functions for PIE. PR ld/19615 * ld.texinfo: Document -Bsymbolic and -Bsymbolic-functions for PIE. * lexsup.c (parse_args): Enable -Bsymbolic and -Bsymbolic-functions for PIE. * testsuite/ld-i386/i386.exp: Run pr19175. * testsuite/ld-i386/pr19615.d: New file. * testsuite/ld-i386/pr19615.s: Likewise. * testsuite/ld-x86-64/pr19615.d: Likewise. * testsuite/ld-x86-64/pr19615.s: Likewise.
14 lines
496 B
Makefile
14 lines
496 B
Makefile
#as: --64
|
|
#ld: -pie -Bsymbolic -E -melf_x86_64
|
|
#readelf: -r --wide --dyn-syms
|
|
|
|
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
|
|
Offset Info Type Symbol's Value Symbol's Name \+ Addend
|
|
[0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9]+
|
|
|
|
Symbol table '.dynsym' contains [0-9]+ entries:
|
|
Num: Value Size Type Bind Vis Ndx Name
|
|
#...
|
|
[ ]*[a-f0-9]+: [a-f0-9]+ 0 FUNC GLOBAL DEFAULT [a-f0-9]+ xyzzy
|
|
#...
|