aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-01-12 19:13:49 +0000
committerIan Lance Taylor <ian@airs.com>1996-01-12 19:13:49 +0000
commit02fcd12620bbd5305137708afb2a26607fe48a2b (patch)
tree4c8a66194b0b76b7781da358e4a159f7e8ff8c47 /bfd/elfcode.h
parent3c38b3df0cc9a8bf6569306867022c8d1b200363 (diff)
downloadgdb-02fcd12620bbd5305137708afb2a26607fe48a2b.zip
gdb-02fcd12620bbd5305137708afb2a26607fe48a2b.tar.gz
gdb-02fcd12620bbd5305137708afb2a26607fe48a2b.tar.bz2
* 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.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 2e35f90..48e6d0b 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -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
};