diff options
author | Alan Modra <amodra@gmail.com> | 2008-02-15 08:27:19 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-02-15 08:27:19 +0000 |
commit | 0c8d6e5c6d36827b284c46ae256ace8ed4e3daf8 (patch) | |
tree | 4ea4225932e3ed6f6b1c4f6a342d53677c3a33ac /bfd/elf.c | |
parent | b1f2bf012a5dcdd686a45870ed91e9453e0841fa (diff) | |
download | gdb-0c8d6e5c6d36827b284c46ae256ace8ed4e3daf8.zip gdb-0c8d6e5c6d36827b284c46ae256ace8ed4e3daf8.tar.gz gdb-0c8d6e5c6d36827b284c46ae256ace8ed4e3daf8.tar.bz2 |
* elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
* elf.c (bfd_elf_allocate_object): Don't check for already allocated
tdata.
* elf32-hppa.c (elf32_hppa_mkobject): New function.
(bfd_elf32_mkobject): Define.
* elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
(is_ppc_elf): ..this new macro.
* elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
(is_ppc64_elf): ..this new macro.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -226,17 +226,13 @@ bfd_elf_gnu_hash (const char *namearg) return h & 0xffffffff; } -/* If ABFD does not already have an allocated tdata field then create - one, OBJECT_SIZE bytes is length, zeroed out and with the object_id - field of an elf_obj_tdata field set to OBJECT_ID. */ +/* Create a tdata field OBJECT_SIZE bytes in length, zeroed out and with + the object_id field of an elf_obj_tdata field set to OBJECT_ID. */ bfd_boolean -bfd_elf_allocate_object (bfd * abfd, +bfd_elf_allocate_object (bfd *abfd, size_t object_size, enum elf_object_id object_id) { - if (abfd->tdata.any != NULL) - return TRUE; - BFD_ASSERT (object_size >= sizeof (struct elf_obj_tdata)); abfd->tdata.any = bfd_zalloc (abfd, object_size); if (abfd->tdata.any == NULL) |