aboutsummaryrefslogtreecommitdiff
path: root/bfd/sunos.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-06-11 20:40:59 +0000
committerIan Lance Taylor <ian@airs.com>1994-06-11 20:40:59 +0000
commit4298e311fecf31dc42bda5e366600903631775fe (patch)
tree0f80fbf2c43a319a8997958d3b7b5e8c9dd0f0ce /bfd/sunos.c
parent0242cd5697001c82a49d0148463b3083a0d56667 (diff)
downloadgdb-4298e311fecf31dc42bda5e366600903631775fe.zip
gdb-4298e311fecf31dc42bda5e366600903631775fe.tar.gz
gdb-4298e311fecf31dc42bda5e366600903631775fe.tar.bz2
Add weak symbols as an extension to a.out.
* aoutx.h (sym_in_text_section): Don't define. (sym_in_data_section, sym_in_bss_section): Likewise. (sym_is_undefined, sym_is_global_defn): Likewise. (sym_is_debugger_info, sym_is_fortrancommon): Likewise. (sym_is_absolute, sym_is_indirect): Likewise. (translate_from_native_sym_flags): Rewrite for clarity. Rearrange arguments and change caller. Handle weak symbols. (translate_to_native_sym_flags): Likewise. (aout_link_check_ar_symbols): Don't ignore weak symbols. Pull object in from archive if a weak defintion is found for an existing undefined symbol. (aout_link_add_symbols): Put all cases in switch. Set flags of an undefined symbol to 0. Handle weak symbols. (aout_link_write_symbols): Handle weak symbols. (aout_link_write_other_symbol): Likewise. (aout_link_input_section_std): Likewise. (aout_link_input_section_ext): Likewise. * sunos.c (sunos_write_dynamic_symbol): Likewise.
Diffstat (limited to 'bfd/sunos.c')
-rw-r--r--bfd/sunos.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 9740cdd..0ebc9ad 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -1513,7 +1513,7 @@ sunos_scan_dynamic_symbol (h, data)
which are referenced by a regular object and defined by a dynamic
object do not seem to show up in the regular symbol table. */
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
- h->root.root.written = true;
+ h->root.written = true;
/* If this symbol is defined by a dynamic object and referenced by a
regular object, see whether we gave it a reasonable value while
@@ -1695,6 +1695,10 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
type = N_UNDF | N_EXT;
val = h->root.root.u.c.size;
break;
+ case bfd_link_hash_weak:
+ type = N_WEAKU;
+ val = 0;
+ break;
case bfd_link_hash_indirect:
case bfd_link_hash_warning:
/* FIXME: Ignore these for now. The circumstances under which