summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/IndustryStandard/PeImage.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-03-13 18:17:05 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-07 13:18:38 +0000
commitd6457b3090fea2e26f94e8419f77455945bc4c41 (patch)
tree3341b3c22615a2636caceae43ebd5266c7ffb8e3 /MdePkg/Include/IndustryStandard/PeImage.h
parentb62d7ac97b67e192d45e02ec3554a52736c66dfa (diff)
downloadedk2-d6457b3090fea2e26f94e8419f77455945bc4c41.tar.gz
edk2-d6457b3090fea2e26f94e8419f77455945bc4c41.tar.bz2
edk2-d6457b3090fea2e26f94e8419f77455945bc4c41.zip
MdePkg/PeCoffLib: Capture DLL characteristics fields in image context
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4405 When loading a PE/COFF image, capture the DLL characteristics fields of the header into our image context structure so we can refer to them when mapping the image. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Oliver Smith-Denny <osde@linux.microsoft.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdePkg/Include/IndustryStandard/PeImage.h')
-rw-r--r--MdePkg/Include/IndustryStandard/PeImage.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/MdePkg/Include/IndustryStandard/PeImage.h b/MdePkg/Include/IndustryStandard/PeImage.h
index dd4cc25483..8646ff22b5 100644
--- a/MdePkg/Include/IndustryStandard/PeImage.h
+++ b/MdePkg/Include/IndustryStandard/PeImage.h
@@ -625,7 +625,8 @@ typedef struct {
UINT32 FileOffset; ///< The file pointer to the debug data.
} EFI_IMAGE_DEBUG_DIRECTORY_ENTRY;
-#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2 ///< The Visual C++ debug information.
+#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2 ///< The Visual C++ debug information.
+#define EFI_IMAGE_DEBUG_TYPE_EX_DLLCHARACTERISTICS 20
///
/// Debug Data Structure defined in Microsoft C++.
@@ -670,6 +671,16 @@ typedef struct {
} EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY;
///
+/// Extended DLL Characteristics
+///
+#define EFI_IMAGE_DLLCHARACTERISTICS_EX_CET_COMPAT 0x0001
+#define EFI_IMAGE_DLLCHARACTERISTICS_EX_FORWARD_CFI_COMPAT 0x0040
+
+typedef struct {
+ UINT32 DllCharacteristicsEx;
+} EFI_IMAGE_DEBUG_EX_DLLCHARACTERISTICS_ENTRY;
+
+///
/// Resource format.
///
typedef struct {