aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 06408b0..5947a3e 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -559,13 +559,6 @@ elf64_x86_64_link_hash_newfunc (struct bfd_hash_entry *entry,
return entry;
}
-static hashval_t
-elf64_x86_64_local_hash (int id, int r_sym)
-{
- return ((((id & 0xff) << 24) | ((id & 0xff00) << 8))
- ^ r_sym ^ (id >> 16));
-}
-
/* Compute a hash of a local hash entry. We use elf_link_hash_entry
for local symbol so that we can handle local STT_GNU_IFUNC symbols
as global symbol. We reuse indx and dynstr_index for local symbol
@@ -576,7 +569,7 @@ elf64_x86_64_local_htab_hash (const void *ptr)
{
struct elf_link_hash_entry *h
= (struct elf_link_hash_entry *) ptr;
- return elf64_x86_64_local_hash (h->indx, h->dynstr_index);
+ return ELF_LOCAL_SYMBOL_HASH (h->indx, h->dynstr_index);
}
/* Compare local hash entries. */
@@ -601,8 +594,8 @@ elf64_x86_64_get_local_sym_hash (struct elf64_x86_64_link_hash_table *htab,
{
struct elf64_x86_64_link_hash_entry e, *ret;
asection *sec = abfd->sections;
- hashval_t h = elf64_x86_64_local_hash (sec->id,
- ELF64_R_SYM (rel->r_info));
+ hashval_t h = ELF_LOCAL_SYMBOL_HASH (sec->id,
+ ELF64_R_SYM (rel->r_info));
void **slot;
e.elf.indx = sec->id;