From 62d7a5f67e8130a28b0555fff3aa27b0b6d3074d Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 23 Jun 2006 02:58:01 +0000 Subject: PR ld/2754 * elf.c (bfd_elf_mkobject): Don't alloc if already done. Set program_header_size to -1. (_bfd_elf_map_sections_to_segments): Adjust program_header_size check. (assign_file_positions_for_load_sections ): Likewise. (_bfd_elf_sizeof_headers): Use saved program_header_size if available. * elf32-arm.c (elf32_arm_mkobject): Call bfd_elf_mkobject, don't alloc if already done. * elf32-i386.c (elf_i386_mkobject): Likewise. * elf32-ppc.c (ppc_elf_mkobject): Likewise. * elf32-s390.c (elf_s390_mkobject): Likewise. * elf32-sh.c (sh_elf_mkobject): Likewise. * elf64-alpha.c (elf64_alpha_mkobject): Likewise. * elf64-ppc.c (ppc64_elf_mkobject): Likewise. * elf64-s390.c (elf_s390_mkobject): Likewise. * elf64-x86-64.c (elf64_x86_64_mkobject): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Likewise. --- bfd/elf32-s390.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'bfd/elf32-s390.c') diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 9d7004e..e2934cf 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -73,8 +73,6 @@ static enum elf_reloc_type_class elf_s390_reloc_type_class PARAMS ((const Elf_Internal_Rela *)); static bfd_boolean elf_s390_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); -static bfd_boolean elf_s390_mkobject - PARAMS ((bfd *)); static bfd_boolean elf_s390_object_p PARAMS ((bfd *)); static bfd_boolean elf_s390_grok_prstatus @@ -678,14 +676,16 @@ struct elf_s390_obj_tdata (elf_s390_tdata (abfd)->local_got_tls_type) static bfd_boolean -elf_s390_mkobject (abfd) - bfd *abfd; +elf_s390_mkobject (bfd *abfd) { - bfd_size_type amt = sizeof (struct elf_s390_obj_tdata); - abfd->tdata.any = bfd_zalloc (abfd, amt); if (abfd->tdata.any == NULL) - return FALSE; - return TRUE; + { + bfd_size_type amt = sizeof (struct elf_s390_obj_tdata); + abfd->tdata.any = bfd_zalloc (abfd, amt); + if (abfd->tdata.any == NULL) + return FALSE; + } + return bfd_elf_mkobject (abfd); } static bfd_boolean -- cgit v1.1