Enhance objdump's --private option so that it can display the contents of PE format files.

* od-pe.c: New file: Dumps fields in PE format headers.
  * configure.ac (od_vectors): Add objdump_private_desc_pe for PE format targets. (od_files): Add od-pe for PE format targets.
  * configure: Regenerate.
  * Makefile.am (CFILES): Add od-pe.c (EXTRA_objdump_SOURCE): Likewise.
  * Makefile.in: Generate.
  * NEWS: Mention the new feature.
  * doc/binutils.texi: Document the new support.
  * objdump.c (wide_output): Change from local to global.
  * objdump.h (wide_output): Prototype. (objdump_private_desc_pe): Prototype.
  * testsuite/binutils-all/objdump.exp: Add a test of the new feature.
This commit is contained in:
Nick Clifton
2023-05-26 15:41:20 +01:00
parent 5fd6b60d86
commit 45b8517aae
11 changed files with 670 additions and 7 deletions

View File

@@ -348,7 +348,7 @@ do
fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
od_vectors="$od_vectors objdump_private_desc_xcoff"
od_vectors="$od_vectors objdump_private_desc_xcoff objdump_private_desc_pe"
else
case $targ in
*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
@@ -470,6 +470,9 @@ changequote([,])dnl
powerpc*-*-aix* | rs6000-*-aix*)
od_vectors="$od_vectors objdump_private_desc_xcoff"
;;
*-*-pe* | *-*-cygwin* | *-*-mingw*)
od_vectors="$od_vectors objdump_private_desc_pe"
;;
*-*-darwin*)
od_vectors="$od_vectors objdump_private_desc_mach_o"
;;
@@ -491,6 +494,8 @@ for i in $od_vectors ; do
od_files="$od_files od-elf32_avr" ;;
objdump_private_desc_xcoff)
od_files="$od_files od-xcoff" ;;
objdump_private_desc_pe)
od_files="$od_files od-pe" ;;
objdump_private_desc_mach_o)
od_files="$od_files od-macho" ;;
*) AC_MSG_ERROR(*** unknown private vector $i) ;;