aboutsummaryrefslogtreecommitdiff
path: root/gas/symbols.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/symbols.c')
-rw-r--r--gas/symbols.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gas/symbols.c b/gas/symbols.c
index d4f09fc..7146c7d 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -2091,16 +2091,20 @@ S_IS_DEFINED (symbolS *s)
int
S_FORCE_RELOC (symbolS *s, int strict)
{
+ segT sec;
if (LOCAL_SYMBOL_CHECK (s))
- return ((struct local_symbol *) s)->lsy_section == undefined_section;
-
- return ((strict
+ sec = ((struct local_symbol *) s)->lsy_section;
+ else
+ {
+ if ((strict
&& ((s->bsym->flags & BSF_WEAK) != 0
|| (EXTERN_FORCE_RELOC
&& (s->bsym->flags & BSF_GLOBAL) != 0)))
- || (s->bsym->flags & BSF_GNU_INDIRECT_FUNCTION) != 0
- || s->bsym->section == undefined_section
- || bfd_is_com_section (s->bsym->section));
+ || (s->bsym->flags & BSF_GNU_INDIRECT_FUNCTION) != 0)
+ return TRUE;
+ sec = s->bsym->section;
+ }
+ return bfd_is_und_section (sec) || bfd_is_com_section (sec);
}
int