aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-04-01 05:40:45 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-04-01 05:41:06 -0700
commitefc3a950394676d0781f0397655d1e8be56450bf (patch)
tree1052e935c34a5ebe3f01be8cd9b22e66c60ab257 /gas/config/tc-i386.h
parent15d47c3a70526cce7bb6a9dcdbd1c19c40247e32 (diff)
downloadgdb-efc3a950394676d0781f0397655d1e8be56450bf.zip
gdb-efc3a950394676d0781f0397655d1e8be56450bf.tar.gz
gdb-efc3a950394676d0781f0397655d1e8be56450bf.tar.bz2
x86: Force relocation against local absolute symbol
Define TC_FORCE_RELOCATION_ABS to force relocation against local absolute symbol. PR gas/25756 * config/tc-i386.h (TC_FORCE_RELOCATION_ABS): New. * testsuite/gas/i386/localpic.s: Add a test for relocation against local absolute symbol. * testsuite/gas/i386/x86-64-localpic.s: Likewise. * testsuite/gas/i386/localpic.d: Updated. * testsuite/gas/i386/x86-64-localpic.d: Likewise. * testsuite/gas/i386/ilp32/x86-64-localpic.d: Likewise.
Diffstat (limited to 'gas/config/tc-i386.h')
-rw-r--r--gas/config/tc-i386.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 93678c2..cb426b5 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -180,6 +180,14 @@ extern int tc_i386_fix_adjustable (struct fix *);
|| (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCRELX \
|| (FIX)->fx_r_type == BFD_RELOC_X86_64_REX_GOTPCRELX)
+#define TC_FORCE_RELOCATION_ABS(FIX) \
+ (TC_FORCE_RELOCATION (FIX) \
+ || (FIX)->fx_r_type == BFD_RELOC_386_GOT32 \
+ || (FIX)->fx_r_type == BFD_RELOC_386_GOT32X \
+ || (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCREL \
+ || (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCRELX \
+ || (FIX)->fx_r_type == BFD_RELOC_X86_64_REX_GOTPCRELX)
+
extern int i386_parse_name (char *, expressionS *, char *);
#define md_parse_name(s, e, m, c) i386_parse_name (s, e, c)