diff options
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 93b3fa6..03ba196 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 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 overflow check to 64-bit objects. 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 |