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
..
2012-04-03 16:01:38 +00:00
2015-02-19 04:45:27 -08:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2010-09-24 06:09:31 +00:00
2010-10-01 04:47:02 +00:00
2010-10-01 04:47:02 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2011-04-04 16:36:29 +00:00
2011-04-04 16:36:29 +00:00
2012-04-03 16:01:38 +00:00
2011-05-01 13:38:22 +00:00
2012-06-06 10:50:18 +00:00
2011-06-24 14:03:15 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-07-02 18:20:31 +00:00
2012-04-03 16:01:38 +00:00
ld/
2012-06-15 15:13:41 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2012-04-03 16:01:38 +00:00
2011-07-27 20:58:14 +00:00