mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +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
443 B
Makefile
14 lines
443 B
Makefile
#as: --32
|
|
#ld: -pie -Bsymbolic -E -melf_i386
|
|
#readelf: -r --wide --dyn-syms
|
|
|
|
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
|
|
Offset Info Type Sym. Value Symbol's Name
|
|
[0-9a-f]+ +[0-9a-f]+ +R_386_RELATIVE +
|
|
|
|
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
|
|
#...
|