aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-03-25 06:03:48 +0000
committerAlan Modra <amodra@gmail.com>2013-03-25 06:03:48 +0000
commit6c9b78e69106c5a87337c10c5f6465332c1d9da7 (patch)
tree87ff9100c2723ad0be12fbfa48e8c305f78aef48 /bfd
parent191c0c4245f0372726aaa6d7972fd7187f7cccb9 (diff)
downloadfsf-binutils-gdb-6c9b78e69106c5a87337c10c5f6465332c1d9da7.zip
fsf-binutils-gdb-6c9b78e69106c5a87337c10c5f6465332c1d9da7.tar.gz
fsf-binutils-gdb-6c9b78e69106c5a87337c10c5f6465332c1d9da7.tar.bz2
* elflink.c (_bfd_elf_merge_symbol): Use local var holding value
of *sym_hash.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c22
2 files changed, 15 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 04e2f2c..f4e80c9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2013-03-25 Alan Modra <amodra@gmail.com>
+ * elflink.c (_bfd_elf_merge_symbol): Use local var holding value
+ of *sym_hash.
+
+2013-03-25 Alan Modra <amodra@gmail.com>
+
* elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
Wrap long lines.
(elf_link_add_object_symbols): Discard TLS symbols for --just-syms
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 1e341da..b57bcd2 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1185,7 +1185,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
/* If the new symbol with non-default visibility comes from a
relocatable file and the old definition comes from a dynamic
object, we remove the old definition. */
- if ((*sym_hash)->root.type == bfd_link_hash_indirect)
+ if (hi->root.type == bfd_link_hash_indirect)
{
/* Handle the case where the old dynamic definition is
default versioned. We need to copy the symbol info from
@@ -1193,13 +1193,11 @@ _bfd_elf_merge_symbol (bfd *abfd,
was referenced before. */
if (h->ref_regular)
{
- struct elf_link_hash_entry *vh = *sym_hash;
-
- vh->root.type = h->root.type;
+ hi->root.type = h->root.type;
h->root.type = bfd_link_hash_indirect;
- (*bed->elf_backend_copy_indirect_symbol) (info, vh, h);
+ (*bed->elf_backend_copy_indirect_symbol) (info, hi, h);
- h->root.u.i.link = (struct bfd_link_hash_entry *) vh;
+ h->root.u.i.link = (struct bfd_link_hash_entry *) hi;
if (ELF_ST_VISIBILITY (sym->st_other) != STV_PROTECTED)
{
/* If the new symbol is hidden or internal, completely undo
@@ -1216,10 +1214,10 @@ _bfd_elf_merge_symbol (bfd *abfd,
h->size = 0;
h->type = 0;
- h = vh;
+ h = hi;
}
else
- h = *sym_hash;
+ h = hi;
}
/* If the old symbol was undefined before, then it will still be
@@ -1496,8 +1494,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
*type_change_ok = TRUE;
}
- if ((*sym_hash)->root.type == bfd_link_hash_indirect)
- flip = *sym_hash;
+ if (hi->root.type == bfd_link_hash_indirect)
+ flip = hi;
else
/* This union may have been set to be non-NULL when this symbol
was seen in a dynamic object. We must force the union to be
@@ -1542,8 +1540,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
*size_change_ok = TRUE;
*type_change_ok = TRUE;
- if ((*sym_hash)->root.type == bfd_link_hash_indirect)
- flip = *sym_hash;
+ if (hi->root.type == bfd_link_hash_indirect)
+ flip = hi;
else
h->verinfo.vertree = NULL;
}