diff options
author | Alan Modra <amodra@gmail.com> | 2006-06-23 02:58:01 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2006-06-23 02:58:01 +0000 |
commit | 62d7a5f67e8130a28b0555fff3aa27b0b6d3074d (patch) | |
tree | e2e3d4570bd1e7f6a008e54ee61aa7fcd320b731 /bfd/elfxx-sparc.c | |
parent | 8c2afc38d89578c715b4f0b7340eccd468b755dc (diff) | |
download | gdb-62d7a5f67e8130a28b0555fff3aa27b0b6d3074d.zip gdb-62d7a5f67e8130a28b0555fff3aa27b0b6d3074d.tar.gz gdb-62d7a5f67e8130a28b0555fff3aa27b0b6d3074d.tar.bz2 |
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/elfxx-sparc.c')
-rw-r--r-- | bfd/elfxx-sparc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 73e8eb2..6da70a3 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -487,11 +487,14 @@ struct _bfd_sparc_elf_obj_tdata bfd_boolean _bfd_sparc_elf_mkobject (bfd *abfd) { - bfd_size_type amt = sizeof (struct _bfd_sparc_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 _bfd_sparc_elf_obj_tdata); + abfd->tdata.any = bfd_zalloc (abfd, amt); + if (abfd->tdata.any == NULL) + return FALSE; + } + return bfd_elf_mkobject (abfd); } static void |