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 Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
ld-arc [ARC] Update ld tests. 2018-11-09 13:24:29 +02:00
ld-arm [ARM] Update bfd's Tag_CPU_arch knowledge 2018-07-02 11:22:20 +01:00
ld-auto-import Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-avr Fix more fallout from 17f6ade235 2018-09-21 09:55:38 +09:30
ld-bootstrap Prune BFD warnings for unknown GNU properties 2018-08-23 06:12:50 -07:00
ld-cdtest Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-checks ld: Add the entry symbol, _main, for LynxOS targets 2018-09-20 12:31:20 -07:00
ld-cris ELF dynsyms 2018-06-14 11:32:01 +09:30
ld-crx Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +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 2018-01-03 17:49:56 +10:30
ld-d10v Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
ld-discard xgate testsuite fixes 2018-07-10 23:59:59 +09:30
ld-elf elf: Add PT_GNU_PROPERTY segment type 2018-12-14 04:55:34 -08:00
ld-elfcomm Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream! 2018-09-20 13:32:58 +01:00
ld-elfvers various i386-aout and i386-coff target removal 2018-04-18 09:34:19 +09:30
ld-elfvsb various i386-aout and i386-coff target removal 2018-04-18 09:34:19 +09:30
ld-elfweak various i386-aout and i386-coff target removal 2018-04-18 09:34:19 +09:30
ld-fastcall Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-frv Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
ld-gc Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
ld-h8300 Remove h8300-coff support 2018-04-16 15:17:57 +09:30
ld-i386 x86: Properly handle PLT expression in directive 2018-12-19 12:22:12 -08:00
ld-ia64 Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
ld-ifunc ld: Append -mx86-used-note=no to ASFLAGS 2018-08-31 04:48:05 -07:00
ld-libs Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-linkonce x86: Add a GNU_PROPERTY_X86_ISA_1_USED note if needed 2018-07-20 09:19:00 -07:00
ld-m68hc11 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-m68k Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
ld-mep Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-metag Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
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 testsuite use of notarget 2018-07-10 23:58:29 +09:30
ld-mmix ld error/warning messages 2018-02-26 10:51:12 +10:30
ld-mn10300 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-msp430-elf Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-nds32 Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream! 2018-09-20 13:32:58 +01:00
ld-nios2 Run more ld tests when not native 2017-01-02 23:48:08 +10:30
ld-or1k or1k: Add the l.adrp insn and supporting relocations 2018-10-05 11:41:41 +09:00
ld-pe ld testsuite use of notarget 2018-07-10 23:58:29 +09:30
ld-pie Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
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 Fix binary compatibility between GCC and the TI compiler for the PRU target. 2018-05-09 11:39:32 +01:00
ld-riscv-elf RISC-V: Adjust __global_pointer$ value to reduce code size. 2018-10-15 16:00:28 -07:00
ld-s12z S12Z Add tests for relocs. 2018-09-16 17:50:09 +02:00
ld-s390 S/390: Prevent GOT access rewrite for certain symbols 2018-09-17 11:01:24 +02:00
ld-scripts elf: Report property change when merging properties 2018-12-07 08:30:43 -08:00
ld-selective Remove sh5 and sh64 support 2018-04-16 15:29:39 +09:30
ld-sh Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
ld-shared various i386-aout and i386-coff target removal 2018-04-18 09:34:19 +09:30
ld-size Ensure that binutils test names are unique. 2018-09-17 10:10:47 +01:00
ld-sparc Define various symbols conditionally in shared libraries 2018-06-08 20:17:34 +09:30
ld-spu Separate header PT_LOAD for -z separate-code 2018-10-08 20:26:08 +10:30
ld-srec ld: Append -Wa,-mx86-used-note=no for S-records tests 2018-08-31 04:44:59 -07:00
ld-tic6x Separate header PT_LOAD for -z separate-code 2018-10-08 20:26:08 +10:30
ld-tilegx Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-tilepro Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-undefined [ARM] FDPIC: Update testsuite so that many tests pass with arm*-uclinuxfdpiceabi. 2018-04-25 21:13:14 +00:00
ld-unique Ensure that binutils test names are unique. 2018-09-17 10:10:47 +01:00
ld-v850 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-vax-elf Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-visium Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-vxworks Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-x86-64 x86: Properly handle PLT expression in directive 2018-12-19 12:22:12 -08:00
ld-xc16x Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-xstormy16 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-xtensa xtensa: ld: convert tests to run_dump_test 2018-07-23 12:06:40 -07:00
ld-z8k Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
lib Fix ld action in run_dump_test 2018-11-01 17:19:17 +00:00
ChangeLog-2004 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2005 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2006 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2007 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2008 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2009 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2010 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2011 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2012 Rotate binutils ChangeLog for 2013 2013-01-02 17:06:32 +00:00
ChangeLog-2013 New Year - binutils ChangeLog rotation 2014-01-08 05:32:12 -08:00
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 Add copyright notices 2012-12-10 12:48:03 +00:00