glibc/sysdeps
H.J. Lu 62da1e3b00 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86
With copy relocation, address of protected data defined in the shared
library may be external.   When there is a relocation against the
protected data symbol within the shared library, we need to check if we
should skip the definition in the executable copied from the protected
data.  This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines
it for x86.  If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x
will skip the data definition in the executable from copy reloc.

	[BZ #17711]
	* elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which
	indicates it is called from do_lookup_x on relocation against
	protected data, skip the data definion in the executable from
	copy reloc.
	(_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA,
	instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for
	EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol.
	* sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA):
	New.  Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined,
	otherwise to 0.
	* sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New.
	* sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class
	to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT.
	* sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New.
	* sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class
	to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT.
2015-03-31 05:16:57 -07:00
..
aarch64 Clean up sysdep-dl-routines variable. 2015-02-06 10:42:08 -08:00
alpha Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
arm ARM: Fix memcpy & memmove for [ARM_ALWAYS_BX] 2015-03-19 12:45:24 -07:00
generic Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 2015-03-31 05:16:57 -07:00
gnu hurd: fix unwind-resume.c build 2015-02-08 18:46:00 +01:00
hppa hppa: Fix feupdateenv and fesetexceptflag (Bug 18111). 2015-03-11 02:48:59 -04:00
i386 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 2015-03-31 05:16:57 -07:00
ia64 Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
ieee754 powerpc: Fix incorrect results for pow when using FMA 2015-03-10 09:38:54 -04:00
init_array NPTL: Initializer for .init_array-only configurations. 2015-02-13 13:19:11 -08:00
m68k m68k: fix 64-bit arithmetic in atomic operations (bug 18128) 2015-03-14 22:27:36 +01:00
mach Fix warnings 2015-03-21 04:49:44 +01:00
microblaze Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
mips 2015-02-18 Steve Ellcey <sellcey@imgtec.com> 2015-02-18 10:51:37 -08:00
nios2 Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
nptl NPTL: Remove duplicate definition of PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP 2015-03-28 01:50:12 -04:00
posix linux: open and openat ignore 'mode' with O_TMPFILE in flags 2015-02-24 13:19:22 +05:30
powerpc Harden powerpc64 elf_machine_fixup_plt 2015-03-26 12:30:45 +10:30
pthread Fix aio_error thread-safety. 2015-03-06 11:32:24 +01:00
s390 S/390: Regenerate ULPs 2015-03-12 11:04:13 +01:00
sh Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
sparc Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
tile Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
unix Remove unused macros from i386 lowlevellock.h. 2015-03-25 21:21:18 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x86 Fix atan / atan2 missing underflows (bug 15319). 2015-02-18 21:10:49 +00:00
x86_64 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 2015-03-31 05:16:57 -07:00