binutils-gdb/ld/testsuite
H.J. Lu ca3fe95e46 Add extern_protected_data and set it for x86
With copy relocation, address of protected data defined in the shared
library may be external.  This patch adds extern_protected_data and
changes _bfd_elf_symbol_refs_local_p to return false for protected data
if extern_protected_data is true.

bfd/

	PR ld/pr15228
	PR ld/pr17709
	* elf-bfd.h (elf_backend_data): Add extern_protected_data.
	* elf32-i386.c (elf_backend_extern_protected_data): New.
	Defined to 1.
	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
	copy relocs against protected symbols if extern_protected_data
	is true.
	(_bfd_elf_symbol_refs_local_p): Don't return true on protected
	non-function symbols if extern_protected_data is true.
	* elfxx-target.h (elf_backend_extern_protected_data): New.
	Default to 0.
	(elfNN_bed): Initialize extern_protected_data with
	elf_backend_extern_protected_data.

ld/testsuite/

	PR ld/pr15228
	PR ld/pr17709
	* ld-i386/i386.exp (i386tests): Add a test for PR ld/17709.
	* ld-i386/pr17709-nacl.rd: New file.
	* ld-i386/pr17709.rd: Likewise.
	* ld-i386/pr17709a.s: Likewise.
	* ld-i386/pr17709b.s: Likewise.
	* ld-i386/protected3.d: Updated.
	* ld-i386/protected3.s: Likewise.
	* ld-x86-64/pr17709-nacl.rd: New file.
	* ld-x86-64/pr17709.rd: Likewise.
	* ld-x86-64/pr17709a.s: Likewise.
	* ld-x86-64/pr17709b.s: Likewise.
	* ld-x86-64/protected3.d: Updated.
	* ld-x86-64/protected3.s: Likewise.
	* ld-x86-64/x86-64.exp (x86_64tests): Add a test for PR ld/17709.
2015-03-05 06:34:53 -08:00
..
config ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-aarch64 Allow MOVK for R_AARCH64_TLSLE_MOVW_TPREL_G{0,1}NC 2015-03-04 09:09:05 +00:00
ld-alpha Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
ld-arm [ARM]Update for Tag_ABI_HardFP_use per EABI doc 2015-02-26 14:11:41 +08:00
ld-auto-import ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-avr AVR/ld: Use .avr.prop data during linker relaxation. 2015-02-25 23:19:11 +00:00
ld-bootstrap ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-cdtest ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-checks ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-cris Strip undefined symbols from .symtab 2015-02-19 13:36:34 +10:30
ld-crx ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-cygwin ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-d10v ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-discard ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-elf Adds support for generating notes in V850 binaries. 2015-02-24 17:54:09 +00:00
ld-elfcomm ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-elfvers ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-elfvsb ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-elfweak ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-fastcall ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-frv ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-gc Fix garbage collection of common symbols 2015-01-19 21:26:30 +10:30
ld-h8300 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-i386 Add extern_protected_data and set it for x86 2015-03-05 06:34:53 -08:00
ld-ia64 Strip undefined symbols from .symtab 2015-02-19 13:36:34 +10:30
ld-ifunc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-libs ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-linkonce ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-m68hc11 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-m68k ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-mep ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-metag ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-mips-elf Strip undefined symbols from .symtab 2015-02-19 13:36:34 +10:30
ld-misc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-mmix Strip undefined symbols from .symtab 2015-02-19 13:36:34 +10:30
ld-mn10300 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-nds32 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-nios2 Nios II CALL26 linker relaxation 2014-01-30 17:47:07 -08:00
ld-pe ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-pie ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-plugin Add a testcase for PR ld/17973 2015-02-14 06:26:20 -08:00
ld-powerpc Strip undefined symbols from .symtab 2015-02-19 13:36:34 +10:30
ld-s390 Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
ld-scripts Allow symbols in MEMORY region specification 2015-01-28 15:06:48 +10:30
ld-selective ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-sh [SH] Fix clrs, sets, pref insn arch memberships. 2015-02-25 21:26:59 +01:00
ld-shared ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-size ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-sparc Pad only text sections at end by default 2015-02-28 22:26:56 +10:30
ld-spu ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-srec ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-tic6x Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
ld-tilegx Pad only text sections at end by default 2015-02-28 22:26:56 +10:30
ld-tilepro Pad only text sections at end by default 2015-02-28 22:26:56 +10:30
ld-undefined ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-unique ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-v850 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-vax-elf ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-versados ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-visium ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-vxworks ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-x86-64 Add extern_protected_data and set it for x86 2015-03-05 06:34:53 -08:00
ld-xc16x ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-xstormy16 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-xtensa ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
lib Move -rc before $aropts 2015-01-29 11:11:03 -08:00
ChangeLog Add extern_protected_data and set it for x86 2015-03-05 06:34:53 -08:00
ChangeLog-2004 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2005 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2006 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2007 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2008 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2009 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2010 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2011 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2012 Rotate binutils ChangeLog for 2013 2013-01-02 17:06:32 +00:00
ChangeLog-2013 New Year - binutils ChangeLog rotation 2014-01-08 05:32:12 -08:00
ChangeLog-2014 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ChangeLog-9303 Add copyright notices 2012-12-10 12:48:03 +00:00