about summary refs log tree commit diff
path: root/misc/mmap64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-11-07 06:32:30 -0800
committerMike Frysinger <vapier@gentoo.org>2016-01-24 03:52:26 -0500
commitfb3642bf3c7743da1928d01525d912ca979b468e (patch)
tree2d8e9eed289bd15b4bacf0fb9f8c5a8f5328ec64 /misc/mmap64.c
parentb4f19537f9d26dbf95bd2e7d9c056400ad1b5723 (diff)
downloadglibc-fb3642bf3c7743da1928d01525d912ca979b468e.tar.gz
glibc-fb3642bf3c7743da1928d01525d912ca979b468e.tar.xz
glibc-fb3642bf3c7743da1928d01525d912ca979b468e.zip
Keep only ELF_RTYPE_CLASS_{PLT|COPY} bits for prelink
prelink runs ld.so with the environment variable LD_TRACE_PRELINKING
set to dump the relocation type class from _dl_debug_bindings.  prelink
has the following relocation type classes:

 #define RTYPE_CLASS_VALID       8
 #define RTYPE_CLASS_PLT         (8|1)
 #define RTYPE_CLASS_COPY        (8|2)
 #define RTYPE_CLASS_TLS         (8|4)

where ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA has a conflict with
RTYPE_CLASS_TLS.

Since prelink only uses ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY
bits, we should clear the other bits when the DL_DEBUG_PRELINK bit is
set.

	[BZ #19178]
	* elf/dl-lookup.c (RTYPE_CLASS_VALID): New.
	(RTYPE_CLASS_PLT): Likewise.
	(RTYPE_CLASS_COPY): Likewise.
	(RTYPE_CLASS_TLS): Likewise.
	(_dl_debug_bindings): Use RTYPE_CLASS_TLS and RTYPE_CLASS_VALID
	to set relocation type class for DL_DEBUG_PRELINK.  Keep only
	ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY bits for
	DL_DEBUG_PRELINK.

(cherry picked from commit f3d18efb8a720121066dc3401e822043beb98cde)
(cherry picked from commit 387011e0b6f9cbefd26691f0df8ce76bb7ddfa03)
Diffstat (limited to 'misc/mmap64.c')
0 files changed, 0 insertions, 0 deletions