diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/mixed-mode-reloc32.d | 2 |
3 files changed, 15 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index eef02b8..4b64a58 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2018-11-05 H.J. Lu <hongjiu.lu@intel.com> + + PR gas/r23854 + * config/tc-i386.c (output_disp): Disable GOT relaxation with + data prefix. + * testsuite/gas/i386/mixed-mode-reloc32.d: Updated. + 2018-11-01 Thomas Preud'homme <thomas.preudhomme@linaro.org> * testsuite/config/default.exp: Define LD, LDFLAGS and diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index e808d20..7d4ffc8 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -8419,12 +8419,13 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off) /* Check for "call/jmp *mem", "mov mem, %reg", "test %reg, mem" and "binop mem, %reg" where binop is one of adc, add, and, cmp, or, sbb, sub, xor - instructions. Always generate R_386_GOT32X for - "sym*GOT" operand in 32-bit mode. */ - if ((generate_relax_relocations - || (!object_64bit - && i.rm.mode == 0 - && i.rm.regmem == 5)) + instructions without data prefix. Always generate + R_386_GOT32X for "sym*GOT" operand in 32-bit mode. */ + if (i.prefix[DATA_PREFIX] == 0 + && (generate_relax_relocations + || (!object_64bit + && i.rm.mode == 0 + && i.rm.regmem == 5)) && (i.rm.mode == 2 || (i.rm.mode == 0 && i.rm.regmem == 5)) && ((i.operands == 1 diff --git a/gas/testsuite/gas/i386/mixed-mode-reloc32.d b/gas/testsuite/gas/i386/mixed-mode-reloc32.d index a2ef6a0..59234bc 100644 --- a/gas/testsuite/gas/i386/mixed-mode-reloc32.d +++ b/gas/testsuite/gas/i386/mixed-mode-reloc32.d @@ -7,7 +7,7 @@ RELOCATION RECORDS FOR \[.text\]: OFFSET[ ]+TYPE[ ]+VALUE[ ]* -[0-9a-f]+[ ]+R_386_GOT32X[ ]+xtrn[ ]* +[0-9a-f]+[ ]+R_386_GOT32[ ]+xtrn[ ]* [0-9a-f]+[ ]+R_386_PLT32[ ]+xtrn[ ]* [0-9a-f]+[ ]+R_386_GOT32X[ ]+xtrn[ ]* [0-9a-f]+[ ]+R_386_PLT32[ ]+xtrn[ ]* |