aboutsummaryrefslogtreecommitdiff
path: root/gas/symbols.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-09-05 00:01:18 +0000
committerAlan Modra <amodra@gmail.com>2002-09-05 00:01:18 +0000
commita161fe53205dbc69d42f5a123b2b04346724b2de (patch)
treebb28dde4f0deee90db9e7a8247fb82dd2e4933fe /gas/symbols.c
parent8f8429869e9a245fe48b8c69bde2bffa3d6c7734 (diff)
downloadgdb-a161fe53205dbc69d42f5a123b2b04346724b2de.zip
gdb-a161fe53205dbc69d42f5a123b2b04346724b2de.tar.gz
gdb-a161fe53205dbc69d42f5a123b2b04346724b2de.tar.bz2
gas reloc rewrite.
Diffstat (limited to 'gas/symbols.c')
-rw-r--r--gas/symbols.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gas/symbols.c b/gas/symbols.c
index 63b4d47..6d8147c 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1762,6 +1762,28 @@ S_IS_DEFINED (s)
return s->bsym->section != undefined_section;
}
+
+#ifndef EXTERN_FORCE_RELOC
+#define EXTERN_FORCE_RELOC IS_ELF
+#endif
+
+/* Return true for symbols that should not be reduced to section
+ symbols or eliminated from expressions, because they may be
+ overridden by the linker. */
+int
+S_FORCE_RELOC (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return ((struct local_symbol *) s)->lsy_section == undefined_section;
+
+ return ((s->bsym->flags & BSF_WEAK) != 0
+ || (EXTERN_FORCE_RELOC
+ && (s->bsym->flags & BSF_GLOBAL) != 0)
+ || s->bsym->section == undefined_section
+ || bfd_is_com_section (s->bsym->section));
+}
+
int
S_IS_DEBUG (s)
symbolS *s;