old-cross-binutils/ld/testsuite/ld-x86-64/pr19615.d
H.J. Lu e20365c5d0 Enable -Bsymbolic and -Bsymbolic-functions to PIE
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.
2016-02-11 15:20:13 -08:00

13 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
#...