binutils-gdb/ld/testsuite
H.J. Lu 83924b3846 x86-64: Restore PIC check for PCREL reloc against protected symbol
commit bd7ab16b45
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Feb 13 07:34:22 2018 -0800

    x86-64: Generate branch with PLT32 relocation

removed check R_X86_64_PC32 relocation against protected symbols in
shared objects.  Since elf_x86_64_check_relocs is called after we
have seen all input files, we can check for PC-relative relocations in
elf_x86_64_check_relocs.  We should not allow PC-relative relocations
against protected symbols since address of protected function and
location of protected data may not be in the shared object.

bfd/

	PR ld/24151
	* elf64-x86-64.c (elf_x86_64_need_pic): Check
	SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
	(elf_x86_64_relocate_section): Move PIC check for PC-relative
	relocations to ...
	(elf_x86_64_check_relocs): Here.
	(elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
	to check if a symbol is defined in a non-shared object.
	* elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.

ld/

	PR ld/24151
	* testsuite/ld-x86-64/pr24151a-x32.d: New file.
	* testsuite/ld-x86-64/pr24151a.d: Likewise.
	* testsuite/ld-x86-64/pr24151a.s: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Run pr24151a and pr24151a-x32.
2019-02-05 18:45:34 -08:00
..
config Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-aarch64 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-alpha Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-arc Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-arm Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-auto-import Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-avr Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-bootstrap Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-cdtest Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-checks Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-cris Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-crx Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-csky Add support for the C_SKY series of processors. 2018-07-30 12:24:14 +01:00
ld-cygwin Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-d10v Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-discard Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-elf run_dump_test source in build directory 2019-01-08 18:50:54 +10:30
ld-elfcomm Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-elfvers Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-elfvsb Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-elfweak Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-fastcall Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-frv Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-gc Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-h8300 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-i386 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-ia64 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-ifunc Skip ld/pr23169 on SPARC. 2019-01-29 10:11:01 +01:00
ld-libs Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-linkonce Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-m68hc11 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-m68k run_dump_test source in build directory 2019-01-08 18:50:54 +10:30
ld-mep Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-metag Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-mips-elf Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-misc Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-mmix Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-mn10300 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-msp430-elf Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-nds32 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-nios2 Run more ld tests when not native 2017-01-02 23:48:08 +10:30
ld-or1k Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-pe Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-pie Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-plugin Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-powerpc Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-pru Fix binary compatibility between GCC and the TI compiler for the PRU target. 2018-05-09 11:39:32 +01:00
ld-riscv-elf Fix spelling mistakes in BFD library. 2019-01-21 12:39:24 +00:00
ld-s12z Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-s390 Add support to GNU ld to separate got related plt entries from normal ones in order to be able to switch the non-plt got entries to read-only after startup, conforming to revised Linux for zSeries ABI. 2019-01-14 16:00:14 +00:00
ld-scripts Add a testcase for PR ld/24008 2019-01-29 06:07:42 -08:00
ld-selective Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-sh Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-shared Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-size Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-sparc Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-spu Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-srec Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-tic6x Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-tilegx Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-tilepro Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-undefined Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-unique Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-v850 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-vax-elf Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-visium Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-vxworks Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-x86-64 x86-64: Restore PIC check for PCREL reloc against protected symbol 2019-02-05 18:45:34 -08:00
ld-xc16x Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-xstormy16 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-xtensa Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-z8k Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
lib Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ChangeLog-2015 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-9303