aboutsummaryrefslogtreecommitdiff
path: root/bfd/pe-x86_64.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2014-12-24 10:06:57 +0000
committerNick Clifton <nickc@redhat.com>2014-12-24 10:06:57 +0000
commit854399ea9d0d5d5c14b4035bbc0adfe891f26a3d (patch)
tree2edc46b1db5218e2cecaee551378b734303e525d /bfd/pe-x86_64.c
parentc361b9ac1ffcf62fb5d4c031c55e60cea963a85d (diff)
downloadgdb-854399ea9d0d5d5c14b4035bbc0adfe891f26a3d.zip
gdb-854399ea9d0d5d5c14b4035bbc0adfe891f26a3d.tar.gz
gdb-854399ea9d0d5d5c14b4035bbc0adfe891f26a3d.tar.bz2
This patch adds support for printing out the pdata section of PE objects.
* pe-x86_64.c (pex64_bfd_print_pdata): Add external declaration. (bfd_pe_print_data): Set macro to pex64_bfd_print_data. * pei-x86_64.c (pex64_bfd_print_pdata): Changed to global function. Now handles multiple .pdata sections. (pex_bfd_print_pdata_section): New static helper function, using most of old pex_bfd_print_pdata function code, but adding support for coff pe objects, which might have some fields starting at zero offset. (pex64_print_all_pdata_sections) : New static helper function, used in call to bfd_map_over_sections inside new pex66_bfd_print_pdata function. (bfd_boolean pdata_count): New static variable, used to return bfd_boolean value for pex64_bfd_print_pdata function.
Diffstat (limited to 'bfd/pe-x86_64.c')
-rw-r--r--bfd/pe-x86_64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/pe-x86_64.c b/bfd/pe-x86_64.c
index 673a544..adaefb7 100644
--- a/bfd/pe-x86_64.c
+++ b/bfd/pe-x86_64.c
@@ -58,6 +58,12 @@
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
+/* The function pex64_bfd_print_pdata is implemented in pei-x86_64.c
+ source, but has be extended to also handle pe objects. */
+extern bfd_boolean pex64_bfd_print_pdata (bfd *, void *);
+
+#define bfd_pe_print_pdata pex64_bfd_print_pdata
+
#include "coff-x86_64.c"
/* Entry for big object files. */