aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/peXXigen.c31
-rw-r--r--include/ChangeLog6
-rw-r--r--include/coff/pe.h2
4 files changed, 47 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");
diff --git a/include/ChangeLog b/include/ChangeLog
index 83ae2cb..20aefde 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-21 Eli Zaretskii <eliz@gnu.org>
+
+ PR 27760
+ * coff/pe.h (IMAGE_DLLCHARACTERISTICS_APPCONTAINER): Define.
+ (IMAGE_DLLCHARACTERISTICS_GUARD_CF): Define.
+
2021-04-16 Alan Modra <amodra@gmail.com>
PR 27567
diff --git a/include/coff/pe.h b/include/coff/pe.h
index d6e8469..9e1ea4b 100644
--- a/include/coff/pe.h
+++ b/include/coff/pe.h
@@ -49,7 +49,9 @@
#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200
#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400
#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800
+#define IMAGE_DLLCHARACTERISTICS_APPCONTAINER 0x1000
#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000
+#define IMAGE_DLLCHARACTERISTICS_GUARD_CF 0x4000
#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
/* Additional flags to be set for section headers to allow the NT loader to