diff options
author | Alan Modra <amodra@bigpond.net.au> | 2006-06-23 02:58:01 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2006-06-23 02:58:01 +0000 |
commit | aa9948796d4ca9d27b2ef4cf828df9e9918c67b1 (patch) | |
tree | 6ffeed6be709908660c128d6c4fa3d21a012ad74 /bfd/elf32-ppc.c | |
parent | b055d1afc85202c3e9e7017864ad0f18fcdefaba (diff) | |
download | gdb-aa9948796d4ca9d27b2ef4cf828df9e9918c67b1.tar.gz |
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.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 5d1386eb07f..bc449b3f3ec 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1708,11 +1708,14 @@ struct ppc_elf_obj_tdata static bfd_boolean ppc_elf_mkobject (bfd *abfd) { - bfd_size_type amt = sizeof (struct ppc_elf_obj_tdata); - abfd->tdata.any = bfd_zalloc (abfd, amt); if (abfd->tdata.any == NULL) - return FALSE; - return TRUE; + { + bfd_size_type amt = sizeof (struct ppc_elf_obj_tdata); + abfd->tdata.any = bfd_zalloc (abfd, amt); + if (abfd->tdata.any == NULL) + return FALSE; + } + return bfd_elf_mkobject (abfd); } /* Fix bad default arch selected for a 32 bit input bfd when the |