diff options
author | Eli Zaretskii <eliz@gnu.org> | 2021-04-21 17:38:52 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-04-21 17:38:52 +0100 |
commit | 18e9a809e864e68ed999f3a9a06dce55b7a2c0f4 (patch) | |
tree | e440f1b93d3e4252fefe17c30bd8807516681d53 /bfd | |
parent | 10a636ccb4635ccb85780f432b089521a1d85e18 (diff) | |
download | gdb-18e9a809e864e68ed999f3a9a06dce55b7a2c0f4.zip gdb-18e9a809e864e68ed999f3a9a06dce55b7a2c0f4.tar.gz gdb-18e9a809e864e68ed999f3a9a06dce55b7a2c0f4.tar.bz2 |
Extend the description of PE header flags.
PR 27760
include * coff/pe.h (IMAGE_DLLCHARACTERISTICS_APPCONTAINER): Define.
(IMAGE_DLLCHARACTERISTICS_GUARD_CF): Define.
bfd * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
Decode the contents of the DllCharacteristics field.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/peXXigen.c | 31 |
2 files changed, 39 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 85f4f37..db31bdb 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2021-04-21 Eli Zaretskii <eliz@gnu.org> + + PR 27760 + * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display + of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP, + IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags. + Decode the contents of the DllCharacteristics field. + 2021-04-21 Nick Clifton <nickc@redhat.com> PR 27759 diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index b9a679a..c41c329 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -2720,8 +2720,11 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) PF (IMAGE_FILE_BYTES_REVERSED_LO, "little endian"); PF (IMAGE_FILE_32BIT_MACHINE, "32 bit words"); PF (IMAGE_FILE_DEBUG_STRIPPED, "debugging information removed"); + PF (IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP, "copy to swap file if on removable media"); + PF (IMAGE_FILE_NET_RUN_FROM_SWAP, "copy to swap file if on network media"); PF (IMAGE_FILE_SYSTEM, "system file"); PF (IMAGE_FILE_DLL, "DLL"); + PF (IMAGE_FILE_UP_SYSTEM_ONLY, "run only on uniprocessor machine"); PF (IMAGE_FILE_BYTES_REVERSED_HI, "big endian"); #undef PF @@ -2848,6 +2851,34 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) if (subsystem_name) fprintf (file, "\t(%s)", subsystem_name); fprintf (file, "\nDllCharacteristics\t%08x\n", i->DllCharacteristics); + if (i->DllCharacteristics) + { + unsigned short dllch = i->DllCharacteristics; + const char *indent = "\t\t\t\t\t"; + + if (dllch & IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA) + fprintf (file, "%sHIGH_ENTROPY_VA\n", indent); + if (dllch & IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE) + fprintf (file, "%sDYNAMIC_BASE\n", indent); + if (dllch & IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY) + fprintf (file, "%sFORCE_INTEGRITY\n", indent); + if (dllch & IMAGE_DLL_CHARACTERISTICS_NX_COMPAT) + fprintf (file, "%sNX_COMPAT\n", indent); + if (dllch & IMAGE_DLLCHARACTERISTICS_NO_ISOLATION) + fprintf (file, "%sNO_ISOLATION\n", indent); + if (dllch & IMAGE_DLLCHARACTERISTICS_NO_SEH) + fprintf (file, "%sNO_SEH\n", indent); + if (dllch & IMAGE_DLLCHARACTERISTICS_NO_BIND) + fprintf (file, "%sNO_BIND\n", indent); + if (dllch & IMAGE_DLLCHARACTERISTICS_APPCONTAINER) + fprintf (file, "%sAPPCONTAINER\n", indent); + if (dllch & IMAGE_DLLCHARACTERISTICS_WDM_DRIVER) + fprintf (file, "%sWDM_DRIVER\n", indent); + if (dllch & IMAGE_DLLCHARACTERISTICS_GUARD_CF) + fprintf (file, "%sGUARD_CF\n", indent); + if (dllch & IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE) + fprintf (file, "%sTERMINAL_SERVICE_AWARE\n", indent); + } fprintf (file, "SizeOfStackReserve\t"); bfd_fprintf_vma (abfd, file, i->SizeOfStackReserve); fprintf (file, "\nSizeOfStackCommit\t"); |