summaryrefslogtreecommitdiff
path: root/bfd/elfcore.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2003-07-08 08:08:00 +0000
committerAlan Modra <amodra@bigpond.net.au>2003-07-08 08:08:00 +0000
commita398daa0b0f558492a298e6b1c79a29bae3c9de3 (patch)
tree328c6a5d6ab2395314e404c0b94bb19c3bcb4f8d /bfd/elfcore.h
parentc60b0eee338dce977fabc7bf0a48162156986b9f (diff)
downloadbinutils-redhat-a398daa0b0f558492a298e6b1c79a29bae3c9de3.tar.gz
* elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
* elfcore.h (elf_core_file_p): Likewise. * section.c (bfd_section_init): Remove prototype.
Diffstat (limited to 'bfd/elfcore.h')
-rw-r--r--bfd/elfcore.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/bfd/elfcore.h b/bfd/elfcore.h
index 724d607d3a..cd218066dc 100644
--- a/bfd/elfcore.h
+++ b/bfd/elfcore.h
@@ -122,15 +122,13 @@ elf_core_file_p (abfd)
goto wrong;
}
- /* Give abfd an elf_obj_tdata. */
- amt = sizeof (struct elf_obj_tdata);
- preserve.marker = bfd_zalloc (abfd, amt);
- if (preserve.marker == NULL)
- goto fail;
if (!bfd_preserve_save (abfd, &preserve))
goto fail;
- elf_tdata (abfd) = preserve.marker;
+ /* Give abfd an elf_obj_tdata. */
+ if (! (*abfd->xvec->_bfd_set_format[bfd_core]) (abfd))
+ goto fail;
+ preserve.marker = elf_tdata (abfd);
/* Swap in the rest of the header, now that we have the byte order. */
i_ehdrp = elf_elfheader (abfd);