aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-10-05 01:49:36 +0000
committerAlan Modra <amodra@gmail.com>2000-10-05 01:49:36 +0000
commitce8a8b2f62dfee9b7cc76061bb65986ac944f4f8 (patch)
tree1725bc6e4feaf4f1b5f7a924e992e7056f16d6a9 /gas/config/tc-i386.h
parent077276e87bab27e860b7d16c0be1172e3a37c42c (diff)
downloadgdb-ce8a8b2f62dfee9b7cc76061bb65986ac944f4f8.zip
gdb-ce8a8b2f62dfee9b7cc76061bb65986ac944f4f8.tar.gz
gdb-ce8a8b2f62dfee9b7cc76061bb65986ac944f4f8.tar.bz2
Correct handling of non-global syms in linkonce sections.
Tidy a few comments.
Diffstat (limited to 'gas/config/tc-i386.h')
-rw-r--r--gas/config/tc-i386.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index c9e29c6..1c62e70 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -43,8 +43,15 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF) || defined (OBJ_MAYBE_COFF) || defined (OBJ_COFF)) && !defined (TE_PE)
/* This arranges for gas/write.c to not apply a relocation if
- tc_fix_adjustable() says it is not adjustable. */
-#define TC_FIX_ADJUSTABLE(fixP) tc_fix_adjustable (fixP)
+ tc_fix_adjustable() says it is not adjustable.
+ The "! symbol_used_in_reloc_p" test is there specifically to cover
+ the case of non-global symbols in linkonce sections. It's the
+ generally correct thing to do though; If a reloc is going to be
+ emitted against a symbol then we don't want to adjust the fixup by
+ applying the reloc during assembly. The reloc will be applied by
+ the linker during final link. */
+#define TC_FIX_ADJUSTABLE(fixP) \
+ (! symbol_used_in_reloc_p ((fixP)->fx_addsy) && tc_fix_adjustable (fixP))
#endif
/* This is the relocation type for direct references to GLOBAL_OFFSET_TABLE.