diff options
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r-- | bfd/elfxx-mips.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index a0439041c0..fda653e1af 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -534,8 +534,9 @@ struct mips_elf_link_hash_table /* Get the MIPS ELF linker hash table from a link_info structure. */ #define mips_elf_hash_table(p) \ - (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \ - == MIPS_ELF_DATA ? ((struct mips_elf_link_hash_table *) ((p)->hash)) : NULL) + ((is_elf_hash_table ((p)->hash) \ + && elf_hash_table_id (elf_hash_table (p)) == MIPS_ELF_DATA) \ + ? (struct mips_elf_link_hash_table *) (p)->hash : NULL) /* A structure used to communicate with htab_traverse callbacks. */ struct mips_htab_traverse_info |