aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-02-15 08:27:19 +0000
committerAlan Modra <amodra@gmail.com>2008-02-15 08:27:19 +0000
commit0c8d6e5c6d36827b284c46ae256ace8ed4e3daf8 (patch)
tree4ea4225932e3ed6f6b1c4f6a342d53677c3a33ac /bfd/elf.c
parentb1f2bf012a5dcdd686a45870ed91e9453e0841fa (diff)
downloadgdb-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.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index ad8e921..192e0cc 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -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)