aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-06-16 17:45:08 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-06-16 17:45:08 +0000
commitd2149d727fa0cc33a0cd4a8eee78b9fe4108bede (patch)
tree418cd30479f1c64c09eef349a30bdb0bad00e961 /bfd/elf-bfd.h
parentcc3bd654e497aad7fa2793a7b6eac941e41fe4a8 (diff)
downloadgdb-d2149d727fa0cc33a0cd4a8eee78b9fe4108bede.zip
gdb-d2149d727fa0cc33a0cd4a8eee78b9fe4108bede.tar.gz
gdb-d2149d727fa0cc33a0cd4a8eee78b9fe4108bede.tar.bz2
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/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index a3ae6a2..b81f009 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2163,6 +2163,12 @@ extern bfd_boolean _bfd_elf_create_ifunc_sections
/* Large common section. */
extern asection _bfd_elf_large_com_section;
+/* Hash for local symbol with the first section id, ID, in the input
+ file and the local symbol index, SYM. */
+#define ELF_LOCAL_SYMBOL_HASH(ID, SYM) \
+ (((((ID) & 0xff) << 24) | (((ID) & 0xff00) << 8)) \
+ ^ (SYM) ^ ((ID) >> 16))
+
/* This is the condition under which finish_dynamic_symbol will be called.
If our finish_dynamic_symbol isn't called, we'll need to do something
about initializing any .plt and .got entries in relocate_section. */