diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-09-12 18:59:24 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-09-12 18:59:24 +0000 |
commit | 396aaeb2b690a3aeb287fc2c057d492379654944 (patch) | |
tree | 4d88887e6fac0838ec9236129d4787629da56866 /bfd/aoutx.h | |
parent | 58a4f585f7bcff146614522f598bd6a2f71e5e06 (diff) | |
download | gdb-396aaeb2b690a3aeb287fc2c057d492379654944.zip gdb-396aaeb2b690a3aeb287fc2c057d492379654944.tar.gz gdb-396aaeb2b690a3aeb287fc2c057d492379654944.tar.bz2 |
* sunos.c (sunos_slurp_dynamic_symtab): New static function,
broken out of sunos_canonicalize_dynamic_symtab.
(sunos_canonicalize_dynamic_symtab): Call new function
sunos_slurp_dynamic_symtab.
(sunos_add_dynamic_symbols): Add three new parameters. Return the
dynamic symbol table to the caller.
* aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
callback to override the symbols being read.
* libaout.h (struct aout_backend_data): Add three new parameters
to add_dynamic_symbols callback.
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r-- | bfd/aoutx.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 64b826e..2a44a1f 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -3126,6 +3126,7 @@ aout_link_add_symbols (abfd, info) bfd_vma, const char *, boolean, boolean, struct bfd_link_hash_entry **)); + struct external_nlist *syms; bfd_size_type sym_count; char *strings; boolean copy; @@ -3133,6 +3134,7 @@ aout_link_add_symbols (abfd, info) register struct external_nlist *p; struct external_nlist *pend; + syms = obj_aout_external_syms (abfd); sym_count = obj_aout_external_sym_count (abfd); strings = obj_aout_external_strings (abfd); if (info->keep_memory) @@ -3140,6 +3142,14 @@ aout_link_add_symbols (abfd, info) else copy = true; + if ((abfd->flags & DYNAMIC) != 0 + && aout_backend_info (abfd)->add_dynamic_symbols != NULL) + { + if (! ((*aout_backend_info (abfd)->add_dynamic_symbols) + (abfd, info, &syms, &sym_count, &strings))) + return false; + } + /* We keep a list of the linker hash table entries that correspond to particular symbols. We could just look them up in the hash table, but keeping the list is more efficient. Perhaps this @@ -3155,18 +3165,11 @@ aout_link_add_symbols (abfd, info) } obj_aout_sym_hashes (abfd) = sym_hash; - if ((abfd->flags & DYNAMIC) != 0 - && aout_backend_info (abfd)->add_dynamic_symbols != NULL) - { - if (! (*aout_backend_info (abfd)->add_dynamic_symbols) (abfd, info)) - return false; - } - add_one_symbol = aout_backend_info (abfd)->add_one_symbol; if (add_one_symbol == NULL) add_one_symbol = _bfd_generic_link_add_one_symbol; - p = obj_aout_external_syms (abfd); + p = syms; pend = p + sym_count; for (; p < pend; p++, sym_hash++) { |