* elf.c (_bfd_elf_print_private_bfd_data): Dump contents of

dynamic section, if there is one.
	* elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
	(bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
	(bfd_elf64_swap_dyn_in): Likewise.
	* elfcode.h (elf_swap_dyn_in): Change type of second parameter to
	PTR.
	(NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
This commit is contained in:
Ian Lance Taylor
1996-01-12 19:13:49 +00:00
parent 3c38b3df0c
commit 02fcd12620
4 changed files with 156 additions and 41 deletions

View File

@@ -393,11 +393,13 @@ elf_swap_reloca_out (abfd, src, dst)
}
INLINE void
elf_swap_dyn_in (abfd, src, dst)
elf_swap_dyn_in (abfd, p, dst)
bfd *abfd;
const Elf_External_Dyn *src;
const PTR p;
Elf_Internal_Dyn *dst;
{
const Elf_External_Dyn *src = (const Elf_External_Dyn *) p;
dst->d_tag = get_word (abfd, src->d_tag);
dst->d_un.d_val = get_word (abfd, src->d_un.d_val);
}
@@ -477,11 +479,11 @@ elf_object_p (abfd)
switch (x_ehdr.e_ident[EI_DATA])
{
case ELFDATA2MSB: /* Big-endian */
if (!abfd->xvec->header_byteorder_big_p)
if (! bfd_header_big_endian (abfd))
goto got_wrong_format_error;
break;
case ELFDATA2LSB: /* Little-endian */
if (abfd->xvec->header_byteorder_big_p)
if (! bfd_header_little_endian (abfd))
goto got_wrong_format_error;
break;
case ELFDATANONE: /* No data encoding specified */
@@ -1269,4 +1271,5 @@ const struct elf_size_info NAME(_bfd_elf,size_info) = {
elf_swap_symbol_out,
elf_slurp_reloc_table,
elf_slurp_symbol_table,
elf_swap_dyn_in
};