aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c28
2 files changed, 11 insertions, 23 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f4e80c9..62e521c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2013-03-25 Alan Modra <amodra@gmail.com>
+ * elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.
+ (elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol
+ when override is true.
+
+2013-03-25 Alan Modra <amodra@gmail.com>
+
* elflink.c (_bfd_elf_merge_symbol): Use local var holding value
of *sym_hash.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b57bcd2..89a12e0 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1579,8 +1579,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
Elf_Internal_Sym *sym,
asection **psec,
bfd_vma *value,
- bfd_boolean *dynsym,
- bfd_boolean override)
+ bfd_boolean *dynsym)
{
bfd_boolean type_change_ok;
bfd_boolean size_change_ok;
@@ -1591,6 +1590,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
const struct elf_backend_data *bed;
bfd_boolean collect;
bfd_boolean dynamic;
+ bfd_boolean override;
char *p;
size_t len, shortlen;
asection *sec;
@@ -1603,24 +1603,6 @@ _bfd_elf_add_default_symbol (bfd *abfd,
if (p == NULL || p[1] != ELF_VER_CHR)
return TRUE;
- if (override)
- {
- /* We are overridden by an old definition. We need to check if we
- need to create the indirect symbol from the default name. */
- hi = elf_link_hash_lookup (elf_hash_table (info), name, TRUE,
- FALSE, FALSE);
- BFD_ASSERT (hi != NULL);
- if (hi == h)
- return TRUE;
- while (hi->root.type == bfd_link_hash_indirect
- || hi->root.type == bfd_link_hash_warning)
- {
- hi = (struct elf_link_hash_entry *) hi->root.u.i.link;
- if (hi == h)
- return TRUE;
- }
- }
-
bed = get_elf_backend_data (abfd);
collect = bed->collect;
dynamic = (abfd->flags & DYNAMIC) != 0;
@@ -4425,10 +4407,10 @@ error_free_dyn:
/* Check to see if we need to add an indirect symbol for
the default name. */
- if (definition || h->root.type == bfd_link_hash_common)
+ if (definition
+ || (!override && h->root.type == bfd_link_hash_common))
if (!_bfd_elf_add_default_symbol (abfd, info, h, name, isym,
- &sec, &value, &dynsym,
- override))
+ &sec, &value, &dynsym))
goto error_free_vers;
if (definition && !dynamic)