aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-bout.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-02-02 17:46:05 +0000
committerIan Lance Taylor <ian@airs.com>1996-02-02 17:46:05 +0000
commite24cf2b556c64426980bc2ffcbce0da05284da4e (patch)
tree9324c03b79e000cf42c4a4d4afcfbab5dc87d95d /gas/config/obj-bout.h
parent4771fe157f5360608c445a91bb6bd556a30f93e6 (diff)
downloadgdb-e24cf2b556c64426980bc2ffcbce0da05284da4e.zip
gdb-e24cf2b556c64426980bc2ffcbce0da05284da4e.tar.gz
gdb-e24cf2b556c64426980bc2ffcbce0da05284da4e.tar.bz2
* write.c (write_relocs): Use S_IS_DEFINED and S_IS_COMMON rather
than comparing S_GET_SEGMENT to undefined_section. (write_object_file): Skip symbols which were equated to an undefined or common symbol. * symbols.c (resolve_symbol_value): Use S_IS_DEFINED and S_IS_COMMON rather than comparing S_GET_SEGMENT to undefined_section. (S_GET_VALUE): Likewise. Avoid recursion problems if S_IS_DEFINED or S_IS_COMMON call S_GET_VALUE. * config/obj-aout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER. * config/obj-aout.c (obj_emit_relocations): If a reloc is equated to an undefined or common symbol, convert the reloc to be against the target symbol. (obj_crawl_symbol_chain): Skip symbols which were equated to an undefined or common symbol. * config/obj-bout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER. * config/obj-bout.c (obj_emit_relocations): If a reloc is equated to an undefined or common symbol, convert the reloc to be against the target symbol. (obj_crawl_symbol_chain): Skip symbols which were equated to an undefined or common symbol. * config/obj-coff.c (do_relocs_for): Use S_IS_DEFINED and S_IS_COMMON rather than comparing S_GET_SEGMENT to undefined_section. (yank_symbols): Skip symbols which were equated to an undefined or common symbol.
Diffstat (limited to 'gas/config/obj-bout.h')
-rw-r--r--gas/config/obj-bout.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/config/obj-bout.h b/gas/config/obj-bout.h
index 81621b9..947a140 100644
--- a/gas/config/obj-bout.h
+++ b/gas/config/obj-bout.h
@@ -181,6 +181,10 @@ struct relocation_info
/* True if symbol has been defined, ie is in N_{TEXT,DATA,BSS,ABS} or N_EXT */
#define S_IS_DEFINED(s) ((S_GET_TYPE(s) != N_UNDF) || (S_GET_DESC(s) != 0))
+
+#define S_IS_COMMON(s) \
+ (S_GET_TYPE (s) == N_UNDF && S_GET_VALUE (s) != 0)
+
#define S_IS_REGISTER(s) ((s)->sy_symbol.n_type == N_REGISTER)
/* True if a debug special symbol entry */