aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-microblaze.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-microblaze.c')
-rw-r--r--bfd/elf32-microblaze.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index 10aa022..1b5c2ef 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -756,9 +756,10 @@ struct elf32_mb_link_hash_table
/* Get the ELF linker hash table from a link_info structure. */
-#define elf32_mb_hash_table(p) \
- (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
- == MICROBLAZE_ELF_DATA ? ((struct elf32_mb_link_hash_table *) ((p)->hash)) : NULL)
+#define elf32_mb_hash_table(p) \
+ ((is_elf_hash_table ((p)->hash) \
+ && elf_hash_table_id (elf_hash_table (p)) == MICROBLAZE_ELF_DATA) \
+ ? (struct elf32_mb_link_hash_table *) (p)->hash : NULL)
/* Create an entry in a microblaze ELF linker hash table. */