aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-s390.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-s390.c')
-rw-r--r--bfd/elf32-s390.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 530a10d..158f909 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -751,8 +751,9 @@ struct elf_s390_link_hash_table
/* Get the s390 ELF linker hash table from a link_info structure. */
#define elf_s390_hash_table(p) \
- (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
- == S390_ELF_DATA ? ((struct elf_s390_link_hash_table *) ((p)->hash)) : NULL)
+ ((is_elf_hash_table ((p)->hash) \
+ && elf_hash_table_id (elf_hash_table (p)) == S390_ELF_DATA) \
+ ? (struct elf_s390_link_hash_table *) (p)->hash : NULL)
#undef ELF64
#include "elf-s390-common.c"