mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
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.
This commit is contained in:
@ -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>
|
2021-04-26 Jan Beulich <jbeulich@suse.com>
|
||||||
|
|
||||||
* config/tc-i386.c (tc_gen_reloc): Limit BFD_RELOC_SIZE32
|
* config/tc-i386.c (tc_gen_reloc): Limit BFD_RELOC_SIZE32
|
||||||
|
@ -14205,7 +14205,8 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
|
|||||||
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
|
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
|
||||||
case BFD_RELOC_SIZE32:
|
case BFD_RELOC_SIZE32:
|
||||||
case BFD_RELOC_SIZE64:
|
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))
|
&& !S_IS_EXTERNAL (fixp->fx_addsy))
|
||||||
{
|
{
|
||||||
/* Resolve size relocation against local symbol to size of
|
/* Resolve size relocation against local symbol to size of
|
||||||
|
Reference in New Issue
Block a user