aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h12
1 files changed, 6 insertions, 6 deletions
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)