binutils-gdb/ld/testsuite
Borislav Petkov 0fa0fc8539 x86: Ignore CS/DS/ES/SS segment-override prefixes in 64-bit mode
"In 64-bit mode, the CS, DS, ES, and SS segment-override prefixes have
no effect. These four prefixes are not treated as segment-override
prefixes for the purposes of multiple-prefix rules. Instead, they are
treated as null prefixes." (AMD APM v2).

However, objdump disassembles instructions containing those ignored
prefixes by still generating that segment override:

  66 66 2e 0f 1f 84 00 	data16 nopw %cs:0x0(%rax,%rax,1)
  00 00 00 00

Print those segment override prefixes as excessive ones:

  66 66 2e 0f 1f 84 00    data16 cs nopw 0x0(%rax,%rax,1)
  00 00 00 00

which is what they actually are - they have no effect and the decoding
hardware ignores them.

gas/

2020-11-14  Borislav Petkov  <bp@suse.de>

	* testsuite/gas/i386/x86-64-segovr.d: Adjust regexes.
	* testsuite/gas/i386/x86-64-nops.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-1.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-1-g64.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-1-core2.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-1-k8.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-2.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-3.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-4.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-4-core2.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-4-k8.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-5.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-5-k8.d: Likewise.
	* testsuite/gas/i386/x86-64-nops-7.d: Likewise.
	* testsuite/gas/i386/x86-64-nop-1.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-1a.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-1b.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-1c.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-1d.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-1g.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-2c.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-6.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-7.d: Likewise.
	* testsuite/gas/i386/x86-64-align-branch-8.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-1-core2.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-1-k8.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-1.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-2.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-3.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-4-core2.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-4-k8.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-4.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-5-k8.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops-5.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-nops.d:: Likewise.

ld/

2020-11-14  Borislav Petkov  <bp@suse.de>

	* testsuite/ld-x86-64/pe-x86-64-4.od: Adjust regexes.
	* testsuite/ld-x86-64/tlsld3.dd: Likewise.
	* testsuite/ld-x86-64/tlsld4.dd: Likewise.

opcodes/

2020-11-14  Borislav Petkov  <bp@suse.de>

	* i386-dis.c (ckprefix): Do not assign active_seg_prefix in
	64-bit addressing mode.
	(NOTRACK_Fixup): Test prefixes for PREFIX_DS, instead of
	active_seg_prefix.
2020-11-14 06:20:33 -08:00
..
config ld: Set plug_opt only if compiler is available 2020-10-23 11:25:15 -07:00
ld-aarch64 aarch64: Return an error on conditional branch to an undefined symbol 2020-09-10 21:42:37 +05:30
ld-alpha
ld-arc
ld-arm
ld-auto-import
ld-avr
ld-bootstrap ld: Skip bootstrap tests for -fprofile-generate= 2020-10-22 07:03:59 -07:00
ld-bpf
ld-cdtest
ld-checks Provide dummy libraries for alpha-vms 2020-10-19 16:28:43 +10:30
ld-cris CRIS: fix PR ld/26589, a missing NULL check in fix for PR ld/22269 2020-09-15 02:57:39 +02:00
ld-crx
ld-csky CSKY: Change default linker script for elf toolchain. 2020-10-26 17:13:21 +08:00
ld-ctf
ld-cygwin
ld-d10v
ld-discard
ld-dynamic
ld-elf x86: Support GNU_PROPERTY_X86_ISA_1_BASELINE marker 2020-10-30 06:50:10 -07:00
ld-elfcomm ld: Pass -fno-lto to non LTO tests 2020-10-22 06:04:36 -07:00
ld-elfvers ld: Pass -fno-lto to non LTO tests 2020-10-22 06:04:36 -07:00
ld-elfvsb ld: Pass -fno-lto to non LTO tests 2020-10-22 06:04:36 -07:00
ld-elfweak ld: Pass -fno-lto in ld-elfweak/elfweak.exp 2020-10-26 16:45:35 -07:00
ld-fastcall
ld-frv
ld-gc ld: Pass -fno-lto to non LTO tests 2020-10-22 06:04:36 -07:00
ld-h8300
ld-i386 elf: Set rel_from_abs to 1 for __ehdr_start 2020-11-13 15:44:47 -08:00
ld-ia64
ld-ifunc RISC-V: Support GNU indirect functions. 2020-10-16 10:11:18 +08:00
ld-libs
ld-linkonce
ld-m68hc11
ld-m68k
ld-mep
ld-metag
ld-mips-elf
ld-misc
ld-mmix
ld-mn10300
ld-msp430-elf MSP430: Support relocations for subtract expressions in .uleb128 directives 2020-09-08 16:18:38 +01:00
ld-nds32
ld-nios2
ld-or1k
ld-pdp11
ld-pe
ld-pie
ld-plugin PR26806, Suspected linker bug with LTO 2020-11-02 09:39:53 +10:30
ld-powerpc PR26656 testcases 2020-09-28 19:36:35 +09:30
ld-pru
ld-riscv-elf RISC-V: Fix that IRELATIVE relocs may be inserted to the wrong place. 2020-10-16 10:11:23 +08:00
ld-s12z
ld-s390
ld-scripts Extend ld's -Map=<dir> functionality by allowing '%' to be replaced with the output file path. 2020-11-06 14:36:45 +00:00
ld-selective ld: Pass -fno-lto to non LTO tests 2020-10-22 06:04:36 -07:00
ld-sh
ld-shared ld: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGS 2020-09-03 17:17:19 -07:00
ld-size ld: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGS 2020-09-03 17:17:19 -07:00
ld-sparc
ld-spu
ld-srec ld: Pass -fno-lto to non LTO tests 2020-10-22 06:04:36 -07:00
ld-tic6x
ld-tilegx
ld-tilepro
ld-undefined ld: Pass -fno-lto to non LTO tests 2020-10-22 06:04:36 -07:00
ld-unique
ld-v850
ld-vax-elf
ld-visium
ld-vxworks
ld-x86-64 x86: Ignore CS/DS/ES/SS segment-override prefixes in 64-bit mode 2020-11-14 06:20:33 -08:00
ld-xc16x
ld-xstormy16
ld-xtensa
ld-z8k
ld-z80
lib ld: Pass -fno-lto to non LTO tests 2020-10-22 06:04:36 -07: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