aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-hppa.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-10-15 07:28:45 +0000
committerAlan Modra <amodra@gmail.com>2001-10-15 07:28:45 +0000
commitbbd7ec4a06eab624965300ea7c0b7de4044811b3 (patch)
tree036a3f0dcc47dea288eda2b56bbc56ded2b4fd25 /bfd/elf32-hppa.c
parent616f30976874a54c304cbfb1d9181f53d54c7713 (diff)
downloadgdb-bbd7ec4a06eab624965300ea7c0b7de4044811b3.zip
gdb-bbd7ec4a06eab624965300ea7c0b7de4044811b3.tar.gz
gdb-bbd7ec4a06eab624965300ea7c0b7de4044811b3.tar.bz2
* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
counts for aliases instead of aborting. * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset to -1 for non-function symbols. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to plt.offset instead of plt.refcount when setting to -1.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r--bfd/elf32-hppa.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 557b9fe..6531575 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -1142,13 +1142,41 @@ elf32_hppa_copy_indirect_symbol (dir, ind)
edir = (struct elf32_hppa_link_hash_entry *) dir;
eind = (struct elf32_hppa_link_hash_entry *) ind;
- if (edir->dyn_relocs == NULL)
+ if (eind->dyn_relocs != NULL)
{
+ if (edir->dyn_relocs != NULL)
+ {
+ struct elf32_hppa_dyn_reloc_entry **pp;
+ struct elf32_hppa_dyn_reloc_entry *p;
+
+ if (dir != ind->weakdef)
+ abort ();
+
+ /* Add reloc counts against the weak sym to the strong sym
+ list. Merge any entries against the same section. */
+ for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
+ {
+ struct elf32_hppa_dyn_reloc_entry *q;
+
+ for (q = edir->dyn_relocs; q != NULL; q = q->next)
+ if (q->sec == p->sec)
+ {
+#if RELATIVE_DYNRELOCS
+ q->relative_count += p->relative_count;
+#endif
+ q->count += p->count;
+ *pp = p->next;
+ break;
+ }
+ if (q == NULL)
+ pp = &p->next;
+ }
+ *pp = edir->dyn_relocs;
+ }
+
edir->dyn_relocs = eind->dyn_relocs;
eind->dyn_relocs = NULL;
}
- else if (eind->dyn_relocs != NULL)
- abort ();
_bfd_elf_link_hash_copy_indirect (dir, ind);
}
@@ -1844,6 +1872,8 @@ elf32_hppa_adjust_dynamic_symbol (info, h)
return true;
}
+ else
+ h->plt.offset = (bfd_vma) -1;
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the