]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf32-tilepro.c
elf_hash_table_id access
[thirdparty/binutils-gdb.git] / bfd / elf32-tilepro.c
index e062dc03866470c54a0b4b269bd9f3ac42dcf807..351146673943f839f07b14a7e0ae488eb10446e2 100644 (file)
@@ -729,9 +729,9 @@ tilepro_elf_mkobject (bfd *abfd)
 
 /* Get the Tilepro ELF linker hash table from a link_info structure.  */
 #define tilepro_elf_hash_table(p) \
-  (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
-  == TILEPRO_ELF_DATA \
-  ? ((struct elf_link_hash_table *) ((p)->hash)) : NULL)
+  ((is_elf_hash_table ((p)->hash)                                      \
+    && elf_hash_table_id (elf_hash_table (p)) == TILEPRO_ELF_DATA)     \
+   ? (struct elf_link_hash_table *) (p)->hash : NULL)
 
 static reloc_howto_type *
 tilepro_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,