Skip to content

Commit

Permalink
BaseTools: Add missing MU_CHANGEs
Browse files Browse the repository at this point in the history
Due to cherry-picked changes from edk2, PeImage.h inside of BaseTools
was deleted, including custom MU functionality. This adds those changes
into the MdePkg version of PeImage.h

Additionally, ARM hacks were resolved in BaseTools, allowing additional
MU specific hacks introduced for cross compilation in 6c78186 to be
removed.
  • Loading branch information
Javagedes committed Jun 26, 2023
1 parent 7c6d661 commit 595e2e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions BaseTools/Source/C/Makefiles/ms.common
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win64

# MU_CHANGE Starts: Adding support to build base tools for ARM and AARCH64
!ELSEIF "$(HOST_ARCH)"=="ARM"
ARCH_INCLUDE = $(SOURCE_PATH)\Include\Arm
ARCH_INCLUDE = $(EDK2_PATH)\MdePkg\Include\Arm
BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win32
LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win32
SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win32
SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win32
!ELSEIF "$(HOST_ARCH)"=="AARCH64"
ARCH_INCLUDE = $(SOURCE_PATH)\Include\AArch64
ARCH_INCLUDE = $(EDK2_PATH)\MdePkg\Include\AArch64
BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win64
LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win64
SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win64
Expand Down
14 changes: 12 additions & 2 deletions MdePkg/Include/IndustryStandard/PeImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,17 @@ typedef struct {
//
// DLL Characteristics
//
#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT BIT8 ///< 0x0100 Image is NX compatible
#define IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA 0x0020
#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE 0x0040
#define IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY 0x0080
#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100
#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
// MU_CHANGE END

///
Expand Down Expand Up @@ -722,7 +732,7 @@ typedef struct {
UINT32 FunctionStartAddress;
UINT32 FunctionEndAddress;
UINT32 UnwindInfoAddress;
} RUNTIME_FUNCTION;
} PD_RUNTIME_FUNCTION; // MU_CHANGE: Resolve definition conflict in winnt.h for ARM target.

#endif

Expand Down

0 comments on commit 595e2e3

Please sign in to comment.