PR 26483
* elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before
accessing elf_hash_table_id.
+2020-08-25 Alan Modra <amodra@gmail.com>
+
+ PR 26483
+ * elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before
+ accessing elf_hash_table_id.
+
2020-08-24 Mark Wielaard <mark@klomp.org>
* dwarf2.c (read_attribute_value): Handle DW_FORM_data16.
/* Get the PPC ELF linker hash table from a link_info structure. */
#define ppc_elf_hash_table(p) \
- (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
- == PPC32_ELF_DATA ? ((struct ppc_elf_link_hash_table *) ((p)->hash)) : NULL)
+ ((is_elf_hash_table ((p)->hash) \
+ && elf_hash_table_id (elf_hash_table (p)) == PPC32_ELF_DATA) \
+ ? (struct ppc_elf_link_hash_table *) (p)->hash : NULL)
/* Create an entry in a PPC ELF linker hash table. */