aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-spu.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-spu.c')
-rw-r--r--bfd/elf32-spu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index c6139c9..b29b35c 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -356,7 +356,8 @@ struct got_entry
};
#define spu_hash_table(p) \
- ((struct spu_link_hash_table *) ((p)->hash))
+ (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
+ == SPU_ELF_DATA ? ((struct spu_link_hash_table *) ((p)->hash)) : NULL)
struct call_info
{
@@ -443,7 +444,8 @@ spu_elf_link_hash_table_create (bfd *abfd)
if (!_bfd_elf_link_hash_table_init (&htab->elf, abfd,
_bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry)))
+ sizeof (struct elf_link_hash_entry),
+ SPU_ELF_DATA))
{
free (htab);
return NULL;