aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-02-11 17:46:02 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2013-02-11 17:46:02 +0000
commitd9bf376d0912bb01468ccf66e6f434a88d4b86a6 (patch)
tree9008b5187f56ca77f00e3f632675180e1e56dace /bfd
parent5334aa52f0c538a836409255caabd8f09be9f926 (diff)
downloadgdb-d9bf376d0912bb01468ccf66e6f434a88d4b86a6.zip
gdb-d9bf376d0912bb01468ccf66e6f434a88d4b86a6.tar.gz
gdb-d9bf376d0912bb01468ccf66e6f434a88d4b86a6.tar.bz2
bfd/
* elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to... (mips_elf_got_entry_hash): ...this, deleting the old version. (mips_elf_create_got_info): Use mips_elf_got_entry_hash for both types of GOT. ld/testsuite/ * ld-mips-elf/tls-hidden3.d, ld-mips-elf/tls-hidden3.got, ld-mips-elf/tls-multi-got-1.got, ld-mips-elf/tlsbin-o32.d, ld-mips-elf/tlsbin-o32.got, ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-1.got, ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.got, ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-3.got, ld-mips-elf/tlsdyn-o32.d, ld-mips-elf/tlsdyn-o32.got, ld-mips-elf/tlslib-o32.d, ld-mips-elf/tlslib-o32.got, ld-mips-elf/tlslib-o32-hidden.got, ld-mips-elf/tlslib-o32-ver.got: Adjust GOT layout for new got_entry hash function.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elfxx-mips.c19
2 files changed, 9 insertions, 17 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8434bc3..88ff4ae 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+ * elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to...
+ (mips_elf_got_entry_hash): ...this, deleting the old version.
+ (mips_elf_create_got_info): Use mips_elf_got_entry_hash for
+ both types of GOT.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
* elfxx-mips.c (mips_elf_create_got_info): New function.
(mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it.
(mips_elf_create_got_section): Likewise.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 6c5e0fa..e497bfe 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -699,8 +699,6 @@ static bfd_boolean mips_elf_create_dynamic_relocation
(bfd *, struct bfd_link_info *, const Elf_Internal_Rela *,
struct mips_elf_link_hash_entry *, asection *, bfd_vma,
bfd_vma *, asection *);
-static hashval_t mips_elf_got_entry_hash
- (const void *);
static bfd_vma mips_elf_adjust_gp
(bfd *, struct mips_got_info *, bfd *);
static struct mips_got_info *mips_elf_got_for_ibfd
@@ -2795,19 +2793,6 @@ mips_elf_hash_bfd_vma (bfd_vma addr)
use all fields to compute the hash, and compare the appropriate
union members. */
-static hashval_t
-mips_elf_got_entry_hash (const void *entry_)
-{
- const struct mips_got_entry *entry = (struct mips_got_entry *)entry_;
-
- return entry->symndx
- + ((entry->tls_type & GOT_TLS_LDM) << 17)
- + (! entry->abfd ? mips_elf_hash_bfd_vma (entry->d.address)
- : entry->abfd->id
- + (entry->symndx >= 0 ? mips_elf_hash_bfd_vma (entry->d.addend)
- : entry->d.h->root.root.root.hash));
-}
-
static int
mips_elf_got_entry_eq (const void *entry1, const void *entry2)
{
@@ -2830,7 +2815,7 @@ mips_elf_got_entry_eq (const void *entry1, const void *entry2)
accordingly. */
static hashval_t
-mips_elf_multi_got_entry_hash (const void *entry_)
+mips_elf_got_entry_hash (const void *entry_)
{
const struct mips_got_entry *entry = (struct mips_got_entry *)entry_;
@@ -2902,7 +2887,7 @@ mips_elf_create_got_info (bfd *abfd, bfd_boolean master_got_p)
g->got_entries = htab_try_create (1, mips_elf_got_entry_hash,
mips_elf_got_entry_eq, NULL);
else
- g->got_entries = htab_try_create (1, mips_elf_multi_got_entry_hash,
+ g->got_entries = htab_try_create (1, mips_elf_got_entry_hash,
mips_elf_multi_got_entry_eq, NULL);
if (g->got_entries == NULL)
return NULL;