aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index bc71e98..370a9b7 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1078,13 +1078,6 @@ _bfd_elf_merge_symbol (bfd *abfd,
|| h->root.type == bfd_link_hash_undefined)
*size_change_ok = TRUE;
- /* Skip weak definitions of symbols that are already defined. */
- if (newdef && olddef && newweak && !oldweak)
- {
- *skip = TRUE;
- return TRUE;
- }
-
/* NEWDYNCOMMON and OLDDYNCOMMON indicate whether the new or old
symbol, respectively, appears to be a common symbol in a dynamic
object. If a symbol appears in an uninitialized section, and is
@@ -1211,6 +1204,10 @@ _bfd_elf_merge_symbol (bfd *abfd,
*size_change_ok = TRUE;
}
+ /* Skip weak definitions of symbols that are already defined. */
+ if (newdef && olddef && newweak && !oldweak)
+ *skip = TRUE;
+
/* If the old symbol is from a dynamic object, and the new symbol is
a definition which is not from a dynamic object, then the new
symbol overrides the old symbol. Symbols from regular files