diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-06-25 16:45:12 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-06-25 16:45:12 +0000 |
commit | e9982ee534893860a2efef566eaa375e163b8b33 (patch) | |
tree | ed329b61e5cb5d0bd7ecf385d7f2759f69cb01d9 /bfd | |
parent | 0ac96a37f69c66dc7327dcb35a1affc86a9a82a0 (diff) | |
download | gdb-e9982ee534893860a2efef566eaa375e163b8b33.zip gdb-e9982ee534893860a2efef566eaa375e163b8b33.tar.gz gdb-e9982ee534893860a2efef566eaa375e163b8b33.tar.bz2 |
Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elflink.h (elf_merge_symbols): Resolve indirect and warning
symbols before checking for new symbols.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 3 | ||||
-rw-r--r-- | bfd/elflink.h | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 86d136e..4dc6767 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu> + * elflink.h (elf_merge_symbols): Resolve indirect and warning + symbols before checking for new symbols. + * elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H. Tue Jun 24 11:20:43 1997 Ian Lance Taylor <ian@cygnus.com> diff --git a/bfd/elflink.h b/bfd/elflink.h index 07f3811..d0fccf3 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -319,6 +319,12 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, return false; *sym_hash = h; + /* For merging, we only care about real symbols. */ + + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + /* If we just created the symbol, mark it as being an ELF symbol. Other than that, there is nothing to do--there is no merge issue with a newly defined symbol--so we just return. */ @@ -329,12 +335,6 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, return true; } - /* For merging, we only care about real symbols. */ - - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - /* OLDBFD is a BFD associated with the existing symbol. */ switch (h->root.type) |