summaryrefslogtreecommitdiff
path: root/bfd/elfxx-ia64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2009-06-16 17:45:08 +0000
committerH.J. Lu <hjl@lucon.org>2009-06-16 17:45:08 +0000
commita3d987ee376b4b1d760a2d6a5095be4192d9d770 (patch)
treefcc16f9924ed853b0f58e97fc2bac5060c89c2a8 /bfd/elfxx-ia64.c
parentb9f602cf66388d2732629ad4880b859a73a8f3eb (diff)
downloadbinutils-redhat-a3d987ee376b4b1d760a2d6a5095be4192d9d770.tar.gz
2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New. * elf32-i386.c (elf_i386_local_hash): Removed. (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH. (elf_i386_get_local_sym_hash): Likewise. * elf64-x86-64.c (elf64_x86_64_local_hash): Removed. (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH. (elf64_x86_64_get_local_sym_hash): Likewise. * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise. (get_local_sym_hash): Likewise.
Diffstat (limited to 'bfd/elfxx-ia64.c')
-rw-r--r--bfd/elfxx-ia64.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 2123fe0897..ccb849dc31 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -1809,8 +1809,7 @@ elfNN_ia64_local_htab_hash (const void *ptr)
struct elfNN_ia64_local_hash_entry *entry
= (struct elfNN_ia64_local_hash_entry *) ptr;
- return (((entry->id & 0xff) << 24) | ((entry->id & 0xff00) << 8))
- ^ entry->r_sym ^ (entry->id >> 16);
+ return ELF_LOCAL_SYMBOL_HASH (entry->id, entry->r_sym);
}
/* Compare local hash entries. */
@@ -2033,8 +2032,8 @@ get_local_sym_hash (struct elfNN_ia64_link_hash_table *ia64_info,
{
struct elfNN_ia64_local_hash_entry e, *ret;
asection *sec = abfd->sections;
- hashval_t h = (((sec->id & 0xff) << 24) | ((sec->id & 0xff00) << 8))
- ^ ELFNN_R_SYM (rel->r_info) ^ (sec->id >> 16);
+ hashval_t h = ELF_LOCAL_SYMBOL_HASH (sec->id,
+ ELFNN_R_SYM (rel->r_info));
void **slot;
e.id = sec->id;