* 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.
This commit is contained in:
Alan Modra 2003-07-08 08:08:00 +00:00
parent 234d84da5b
commit 0c83546ac6
4 changed files with 16 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2003-07-08 Alan Modra <amodra@bigpond.net.au>
* 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.
2003-07-08 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer

View File

@ -570,17 +570,15 @@ elf_object_p (abfd)
goto got_wrong_format_error;
}
/* Allocate an instance of the elf_obj_tdata structure and hook it up to
the tdata pointer in the bfd. */
amt = sizeof (struct elf_obj_tdata);
preserve.marker = bfd_zalloc (abfd, amt);
if (preserve.marker == NULL)
goto got_no_match;
if (!bfd_preserve_save (abfd, &preserve))
goto got_no_match;
elf_tdata (abfd) = preserve.marker;
/* Allocate an instance of the elf_obj_tdata structure and hook it up to
the tdata pointer in the bfd. */
if (! (*abfd->xvec->_bfd_set_format[bfd_object]) (abfd))
goto got_no_match;
preserve.marker = elf_tdata (abfd);
/* Now that we know the byte order, swap in the rest of the header */
i_ehdrp = elf_elfheader (abfd);

View File

@ -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);

View File

@ -705,8 +705,6 @@ bfd_section_hash_newfunc (struct bfd_hash_entry *entry,
/* Initializes a new section. NEWSECT->NAME is already set. */
static asection *bfd_section_init PARAMS ((bfd *, asection *));
static asection *
bfd_section_init (bfd *abfd, asection *newsect)
{