diff options
Diffstat (limited to 'bfd/elf32-s390.c')
-rw-r--r-- | bfd/elf32-s390.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 1f197b5..8c6f546 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -1,5 +1,5 @@ /* IBM S/390-specific support for 32-bit ELF - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Carl B. Pedersen and Martin Schwidefsky. This file is part of BFD, the Binary File Descriptor library. @@ -478,13 +478,13 @@ elf_s390_link_hash_table_create (abfd) struct elf_s390_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_s390_link_hash_table); - ret = (struct elf_s390_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct elf_s390_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return NULL; } @@ -1214,10 +1214,12 @@ allocate_dynrelocs (h, inf) struct elf_s390_link_hash_entry *eh; struct elf_s390_dyn_relocs *p; - if (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) + if (h->root.type == bfd_link_hash_indirect) return true; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + info = (struct bfd_link_info *) inf; htab = elf_s390_hash_table (info); @@ -1384,6 +1386,9 @@ readonly_dynrelocs (h, inf) struct elf_s390_link_hash_entry *eh; struct elf_s390_dyn_relocs *p; + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + eh = (struct elf_s390_link_hash_entry *) h; for (p = eh->dyn_relocs; p != NULL; p = p->next) { |