+2021-01-28 Alan Modra <amodra@gmail.com>
+
+ Apply from master
+ 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.
+
2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/27231
/* 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. */