mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
Tidy S_FORCE_RELOC
Separate out symbol flag reasons from section reasons to force a reloc. Yes, this adds another section test to the local symbol case too. * symbols.c (S_FORCE_RELOC): Separate section and symbol tests.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2017-04-27 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* symbols.c (S_FORCE_RELOC): Separate section and symbol tests.
|
||||||
|
|
||||||
2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
|
2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
|
||||||
|
|
||||||
* config/tc-mips.c (RELAX_ENCODE): Add `PIC' flag.
|
* config/tc-mips.c (RELAX_ENCODE): Add `PIC' flag.
|
||||||
|
@ -2091,16 +2091,20 @@ S_IS_DEFINED (symbolS *s)
|
|||||||
int
|
int
|
||||||
S_FORCE_RELOC (symbolS *s, int strict)
|
S_FORCE_RELOC (symbolS *s, int strict)
|
||||||
{
|
{
|
||||||
|
segT sec;
|
||||||
if (LOCAL_SYMBOL_CHECK (s))
|
if (LOCAL_SYMBOL_CHECK (s))
|
||||||
return ((struct local_symbol *) s)->lsy_section == undefined_section;
|
sec = ((struct local_symbol *) s)->lsy_section;
|
||||||
|
else
|
||||||
return ((strict
|
{
|
||||||
|
if ((strict
|
||||||
&& ((s->bsym->flags & BSF_WEAK) != 0
|
&& ((s->bsym->flags & BSF_WEAK) != 0
|
||||||
|| (EXTERN_FORCE_RELOC
|
|| (EXTERN_FORCE_RELOC
|
||||||
&& (s->bsym->flags & BSF_GLOBAL) != 0)))
|
&& (s->bsym->flags & BSF_GLOBAL) != 0)))
|
||||||
|| (s->bsym->flags & BSF_GNU_INDIRECT_FUNCTION) != 0
|
|| (s->bsym->flags & BSF_GNU_INDIRECT_FUNCTION) != 0)
|
||||||
|| s->bsym->section == undefined_section
|
return TRUE;
|
||||||
|| bfd_is_com_section (s->bsym->section));
|
sec = s->bsym->section;
|
||||||
|
}
|
||||||
|
return bfd_is_und_section (sec) || bfd_is_com_section (sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Reference in New Issue
Block a user