aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-04-26 10:39:45 +0200
committerJan Beulich <jbeulich@suse.com>2021-04-26 10:39:45 +0200
commit8fb8824599f37a726685197a1728e92bc7a953e5 (patch)
tree3969fb37fe7fafd20e83f27b8c862c2e8aac5638 /gas/config
parentd965814fb65358df2f02c9f6af41cb1edd289277 (diff)
downloadbinutils-8fb8824599f37a726685197a1728e92bc7a953e5.zip
binutils-8fb8824599f37a726685197a1728e92bc7a953e5.tar.gz
binutils-8fb8824599f37a726685197a1728e92bc7a953e5.tar.bz2
x86: add IS_ELF to check whether to resolve @size reloc
This may not be strictly needed, as BFD_RELOC_SIZE* shouldn't appear from elsewhere for non-ELF, but let's be on the safe side.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 147c820..99f9904 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -14205,7 +14205,8 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
case BFD_RELOC_SIZE32:
case BFD_RELOC_SIZE64:
- if (S_IS_DEFINED (fixp->fx_addsy)
+ if (IS_ELF
+ && S_IS_DEFINED (fixp->fx_addsy)
&& !S_IS_EXTERNAL (fixp->fx_addsy))
{
/* Resolve size relocation against local symbol to size of