This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Check GOTOFF reloc against protected data on x86


*** TEST RESULTS FOR COMMIT 3d9499950a94df8577fa01ba98ec0d58f07fd9c0 ***

Author: H.J. Lu <hjl.tools@gmail.com>
Branch: master
Commit: 3d9499950a94df8577fa01ba98ec0d58f07fd9c0

Check GOTOFF reloc against protected data on x86
R_386_GOTOFF/R_X86_64_GOTOFF64 relocation shouldn't be used against
protected data symbol on x86 since with copy relocation, address of
protected data defined in the shared library may be external.

This patch will break building shared libraries with protected data
symbols using GCCs older than GCC 5 without the bug fix for

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248

GCC backport request should be made in the GCC bug report above.

bfd/

	PR ld/pr17709
	* elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
	against protected data symbol when building shared library.
	* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
	R_X86_64_GOTOFF64 against protected data symbol when building
	shared library.

ld/testsuite/

	PR ld/pr17709
	* ld-i386/protected6.d: New file.
	* ld-i386/protected6.s: Likewise.
	* ld-x86-64/protected6.d: Likewise.
	* ld-x86-64/protected6.s: Likewise.
	* ld-x86-64/protected7.d: Likewise.
	* ld-x86-64/protected7.s: Likewise.
	* ld-x86-64/protected7a.d: Likewise.
	* ld-x86-64/protected7b.d: Likewise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]