diff options
Diffstat (limited to 'bfd/elf32-s390.c')
-rw-r--r-- | bfd/elf32-s390.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 41178d6833..336ba36e8d 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -693,13 +693,13 @@ struct elf_s390_obj_tdata #define is_s390_elf(bfd) \ (bfd_get_flavour (bfd) == bfd_target_elf_flavour \ && elf_tdata (bfd) != NULL \ - && elf_object_id (bfd) == S390_ELF_TDATA) + && elf_object_id (bfd) == S390_ELF_DATA) static bfd_boolean elf_s390_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_s390_obj_tdata), - S390_ELF_TDATA); + S390_ELF_DATA); } static bfd_boolean @@ -737,7 +737,8 @@ struct elf_s390_link_hash_table /* Get the s390 ELF linker hash table from a link_info structure. */ #define elf_s390_hash_table(p) \ - ((struct elf_s390_link_hash_table *) ((p)->hash)) + (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \ + == S390_ELF_DATA ? ((struct elf_s390_link_hash_table *) ((p)->hash)) : NULL) /* Create an entry in an s390 ELF linker hash table. */ @@ -786,7 +787,8 @@ elf_s390_link_hash_table_create (abfd) return NULL; if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc, - sizeof (struct elf_s390_link_hash_entry))) + sizeof (struct elf_s390_link_hash_entry), + S390_ELF_DATA)) { free (ret); return NULL; |