x86: add IS_ELF to check whether to resolve @size reloc
authorJan Beulich <jbeulich@suse.com>
Mon, 26 Apr 2021 08:39:45 +0000 (10:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 Apr 2021 08:39:45 +0000 (10:39 +0200)
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.

gas/ChangeLog
gas/config/tc-i386.c

index 93b3fa67276af19ad255e99f0e15a7bcb8dd1e96..03ba1964176fc4cf36984ad27c06bcc8cdc3e504 100644 (file)
@@ -1,3 +1,8 @@
+2021-04-26  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (tc_gen_reloc): Check IS_ELF for
+       BFD_RELOC_SIZE*.
+
 2021-04-26  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (tc_gen_reloc): Limit BFD_RELOC_SIZE32
index 147c8204b607edff414146dfb778378e29f193a6..99f990464cd62f93a324e461aa9d136fa7ceda89 100644 (file)
@@ -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
This page took 0.029838 seconds and 4 git commands to generate.