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
..
2018-10-29 18:20:48 +10:30
2018-05-04 18:58:23 +09:30
2018-10-29 18:20:48 +10:30
2018-10-29 18:20:48 +10:30
2018-04-25 09:38:17 +09:30
2018-10-29 18:20:48 +10:30
2018-10-29 18:20:48 +10:30
2018-04-23 18:10:41 +09:30
2018-04-23 18:10:41 +09:30
2018-10-29 18:20:48 +10:30
2018-04-16 15:17:57 +09:30
2018-04-16 15:17:57 +09:30
2018-10-29 18:20:48 +10:30
2018-08-31 22:15:05 +09:30
2018-10-29 18:20:48 +10:30
2018-10-29 18:20:48 +10:30
2018-11-07 17:18:05 +09:00
2018-10-29 18:20:48 +10:30
2018-10-29 18:20:48 +10:30
2018-10-29 18:20:48 +10:30
2018-04-16 15:27:45 +09:30
2018-10-29 18:20:48 +10:30
2018-10-29 18:20:48 +10:30
2018-10-29 18:20:48 +10:30
2018-10-29 18:20:48 +10:30