diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-06-11 06:19:16 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-06-11 06:31:59 -0700 |
commit | 2748c1b17e37c5acfae9d5dbcc627350c3d38167 (patch) | |
tree | 52c943a2e4f92ba781e8d1fa376ae9a76e4afdf6 | |
parent | 28b2963ffb4b55cbe720538040623f5c7ccb0a1b (diff) | |
download | gdb-2748c1b17e37c5acfae9d5dbcc627350c3d38167.zip gdb-2748c1b17e37c5acfae9d5dbcc627350c3d38167.tar.gz gdb-2748c1b17e37c5acfae9d5dbcc627350c3d38167.tar.bz2 |
x86: Always define TC_PARSE_CONS_EXPRESSION
Always define TC_PARSE_CONS_EXPRESSION to properly wrap constants for
all x86 targets.
* config/tc-i386.c (x86_cons): Handle GOT/PLT relocations only
if needed.
* config/tc-i386.h (TC_PARSE_CONS_EXPRESSION): Always define.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.h | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 11693d3..6bcb035 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2021-06-11 H.J. Lu <hongjiu.lu@intel.com> + + * config/tc-i386.c (x86_cons): Handle GOT/PLT relocations only + if needed. + * config/tc-i386.h (TC_PARSE_CONS_EXPRESSION): Always define. + 2021-06-11 Nelson Chu <nelson.chu@sifive.com> * config/tc-riscv.c (riscv_set_arch): Call riscv_set_rvc diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 47c12b9..b3f9f31 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -10413,6 +10413,9 @@ x86_cons (expressionS *exp, int size) { bfd_reloc_code_real_type got_reloc = NO_RELOC; +#if ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \ + && !defined (LEX_AT)) \ + || defined (TE_PE) intel_syntax = -intel_syntax; exp->X_md = 0; @@ -10468,6 +10471,9 @@ x86_cons (expressionS *exp, int size) if (intel_syntax) i386_intel_simplify (exp); +#else + expression (exp); +#endif /* If not 64bit, massage value, to account for wraparound when !BFD64. */ if (size == 4 && exp->X_op == O_constant && !object_64bit) diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index 9ca9727..90d23da 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -126,10 +126,7 @@ extern const char *i386_comment_chars; #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" #endif -#if ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \ - && !defined (LEX_AT)) || defined (TE_PE) #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) x86_cons (EXP, NBYTES) -#endif extern bfd_reloc_code_real_type x86_cons (expressionS *, int); #define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP, RELOC) \ |