diff options
author | Jan Beulich <jbeulich@suse.com> | 2020-01-30 17:03:22 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2020-01-30 17:03:22 +0100 |
commit | 2ae4c7035cd77006e43c88f45f26f9a728026669 (patch) | |
tree | b9b8cf2201ac3a96faf5c6b2ac1cd24502a44831 /gas/config | |
parent | 5cebc931d70eedf5f355efe179f4d601cca36243 (diff) | |
download | fsf-binutils-gdb-2ae4c7035cd77006e43c88f45f26f9a728026669.zip fsf-binutils-gdb-2ae4c7035cd77006e43c88f45f26f9a728026669.tar.gz fsf-binutils-gdb-2ae4c7035cd77006e43c88f45f26f9a728026669.tar.bz2 |
x86: prevent undue use of GOT32X and alike relocations
Comparison of i.tm.base_opcode against particular but not sufficiently
specific values needs to be accompanied by other qualification. Exclude
VEX and alike encodings here, and also exclude all forms of prefixes
explicitly specified in the opcodes table. While using @GOT with such
insns may not be very useful, it also isn't with e.g. ADC and SBB, yet
these get explicitly listed in comments as supported.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 4f102a3..945ceb2 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -9061,13 +9061,14 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off) && i.rm.regmem == 5)) && (i.rm.mode == 2 || (i.rm.mode == 0 && i.rm.regmem == 5)) + && !is_any_vex_encoding(&i.tm) && ((i.operands == 1 && i.tm.base_opcode == 0xff && (i.rm.reg == 2 || i.rm.reg == 4)) || (i.operands == 2 && (i.tm.base_opcode == 0x8b || i.tm.base_opcode == 0x85 - || (i.tm.base_opcode & 0xc7) == 0x03)))) + || (i.tm.base_opcode & ~0x38) == 0x03)))) { if (object_64bit) { |