binutils-gdb/ld/testsuite
H.J. Lu b9519cfe98 x86: Properly handle PLT expression in directive
For PLT expressions, we should subtract the PLT relocation size only for
jump instructions.  Since PLT relocations are PC relative, we only allow
"symbol@PLT" in PLT expression.

gas/

	PR gas/23997
	* config/tc-i386.c (x86_cons): Check for invalid PLT expression.
	(md_apply_fix): Subtract the PLT relocation size only for jump
	instructions.
	* testsuite/gas/i386/reloc32.s: Add test for invalid PLT
	expression.
	* testsuite/gas/i386/reloc64.s: Likewise.
	* testsuite/gas/i386/ilp32/reloc64.s: Likewise.
	* testsuite/gas/i386/reloc32.l: Updated.
	* testsuite/gas/i386/reloc64.l: Likewise.
	* testsuite/gas/i386/ilp32/reloc64.l: Likewise.

ld/

	PR gas/23997
	* testsuite/ld-i386/i386.exp: Run PR gas/23997 test.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* testsuite/ld-x86-64/pr23997a.s: New file.
	* testsuite/ld-x86-64/pr23997b.c: Likewise.
	* testsuite/ld-x86-64/pr23997c.c: Likewise.
2018-12-19 12:22:12 -08:00
..
config elfedit: Add --enable-x86-feature/--disable-x86-feature 2018-11-06 09:38:51 -08:00
ld-aarch64 AArch64: Fix regression in Cortex A53 erratum when PIE. (PR ld/23904) 2018-11-27 12:42:22 +00:00
ld-alpha
ld-arc [ARC] Update ld tests. 2018-11-09 13:24:29 +02:00
ld-arm
ld-auto-import
ld-avr Fix more fallout from 17f6ade235 2018-09-21 09:55:38 +09:30
ld-bootstrap
ld-cdtest
ld-checks
ld-cris
ld-crx
ld-csky
ld-cygwin
ld-d10v
ld-discard
ld-elf elf: Add PT_GNU_PROPERTY segment type 2018-12-14 04:55:34 -08:00
ld-elfcomm
ld-elfvers
ld-elfvsb
ld-elfweak
ld-fastcall
ld-frv
ld-gc
ld-h8300
ld-i386 x86: Properly handle PLT expression in directive 2018-12-19 12:22:12 -08:00
ld-ia64
ld-ifunc
ld-libs
ld-linkonce
ld-m68hc11
ld-m68k
ld-mep
ld-metag
ld-mips-elf MIPS/LD: Accept high-part relocations in PIC code with absolute symbols 2018-11-27 16:34:03 +00:00
ld-misc
ld-mmix
ld-mn10300
ld-msp430-elf
ld-nds32
ld-nios2
ld-or1k or1k: Add the l.adrp insn and supporting relocations 2018-10-05 11:41:41 +09:00
ld-pe
ld-pie
ld-plugin Override the previous definition from IR object 2018-12-07 15:40:02 -08:00
ld-powerpc PR23937, powerpc64le local ifunc IRELATIVE relocs are wrong 2018-11-30 16:18:58 +10:30
ld-pru
ld-riscv-elf RISC-V: Adjust __global_pointer$ value to reduce code size. 2018-10-15 16:00:28 -07:00
ld-s12z
ld-s390
ld-scripts elf: Report property change when merging properties 2018-12-07 08:30:43 -08:00
ld-selective
ld-sh
ld-shared
ld-size
ld-sparc
ld-spu Separate header PT_LOAD for -z separate-code 2018-10-08 20:26:08 +10:30
ld-srec
ld-tic6x Separate header PT_LOAD for -z separate-code 2018-10-08 20:26:08 +10:30
ld-tilegx
ld-tilepro
ld-undefined
ld-unique
ld-v850
ld-vax-elf
ld-visium
ld-vxworks
ld-x86-64 x86: Properly handle PLT expression in directive 2018-12-19 12:22:12 -08:00
ld-xc16x
ld-xstormy16
ld-xtensa
ld-z8k
lib Fix ld action in run_dump_test 2018-11-01 17:19:17 +00:00
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-9303