aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-xtensa.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-xtensa.c')
-rw-r--r--bfd/elf32-xtensa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 8928b11..65c6ceb 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -705,8 +705,9 @@ struct elf_xtensa_link_hash_table
/* Get the Xtensa ELF linker hash table from a link_info structure. */
#define elf_xtensa_hash_table(p) \
- (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
- == XTENSA_ELF_DATA ? ((struct elf_xtensa_link_hash_table *) ((p)->hash)) : NULL)
+ ((is_elf_hash_table ((p)->hash) \
+ && elf_hash_table_id (elf_hash_table (p)) == XTENSA_ELF_DATA) \
+ ? (struct elf_xtensa_link_hash_table *) (p)->hash : NULL)
/* Create an entry in an Xtensa ELF linker hash table. */