aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-02-05 15:49:04 +0000
committerAlan Modra <amodra@gmail.com>2003-02-05 15:49:04 +0000
commit6349e62823303e3157524f9e34b6c84eb93f795a (patch)
treedbb0965e2791f7bd9b61406002f908c5f67223c3 /bfd
parent5aa5d4b987c9ce44e87262815317c01fc315cdf9 (diff)
downloadgdb-6349e62823303e3157524f9e34b6c84eb93f795a.zip
gdb-6349e62823303e3157524f9e34b6c84eb93f795a.tar.gz
gdb-6349e62823303e3157524f9e34b6c84eb93f795a.tar.bz2
* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
plt info when called to transfer weak sym info.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-ppc.c35
2 files changed, 23 insertions, 17 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b1a2d67..085ae78 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
+ plt info when called to transfer weak sym info.
+
2003-02-05 Alan Modra <amodra@bigpond.net.au>
* reloc.c: Add PPC and PPC64 TLS relocs.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 2634006..b86bb85 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3286,7 +3286,24 @@ ppc64_elf_copy_indirect_symbol (bed, dir, ind)
eind->dyn_relocs = NULL;
}
- /* Do the same for got entries. */
+ edir->is_func |= eind->is_func;
+ edir->is_func_descriptor |= eind->is_func_descriptor;
+ edir->is_entry |= eind->is_entry;
+
+ /* Copy down any references that we may have already seen to the
+ symbol which just became indirect. */
+ edir->elf.elf_link_hash_flags |=
+ (eind->elf.elf_link_hash_flags
+ & (ELF_LINK_HASH_REF_DYNAMIC
+ | ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_NON_GOT_REF));
+
+ /* If we were called to copy over info for a weak sym, that's all. */
+ if (eind->elf.root.type != bfd_link_hash_indirect)
+ return;
+
+ /* Copy over got entries. */
if (eind->elf.got.glist != NULL)
{
if (edir->elf.got.glist != NULL)
@@ -3345,22 +3362,6 @@ ppc64_elf_copy_indirect_symbol (bed, dir, ind)
eind->elf.plt.plist = NULL;
}
- edir->is_func |= eind->is_func;
- edir->is_func_descriptor |= eind->is_func_descriptor;
- edir->is_entry |= eind->is_entry;
-
- /* Copy down any references that we may have already seen to the
- symbol which just became indirect. */
- edir->elf.elf_link_hash_flags |=
- (eind->elf.elf_link_hash_flags
- & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_NON_GOT_REF));
-
- if (eind->elf.root.type != bfd_link_hash_indirect)
- return;
-
if (edir->elf.dynindx == -1)
{
edir->elf.dynindx = eind->elf.dynindx;