summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-22 22:00:23 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-22 22:00:23 +0200
commit6ec265ee805db6ced0aca0b718a703cc87093b93 (patch)
treeea0a1fbfed3fb9bb13c149b2c2095f48289bedbf /Private/KernelKit
parent76c0c6b21532aee82df5bd62cd886bc63d933899 (diff)
MHR-11: Specify CPU and sub CPU type inside container formats.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/KernelKit')
-rw-r--r--Private/KernelKit/PEF.hpp11
-rw-r--r--Private/KernelKit/PEFCodeManager.hxx1
2 files changed, 11 insertions, 1 deletions
diff --git a/Private/KernelKit/PEF.hpp b/Private/KernelKit/PEF.hpp
index bc2e0990..9fabb189 100644
--- a/Private/KernelKit/PEF.hpp
+++ b/Private/KernelKit/PEF.hpp
@@ -24,7 +24,7 @@
#define kPefMagicLen 5
#define kPefVersion 1
-#define kPefNameLen 64
+#define kPefNameLen 255
/// @brief Preferred Executable Format.
@@ -41,6 +41,13 @@ enum {
};
enum {
+ kPefSubArchAMD,
+ kPefSubArchIntel,
+ kPefSubArchARM,
+ kPefSubArchIBM,
+};
+
+enum {
kPefKindExec = 1, /* .exe */
kPefKindSharedObject = 2, /* .lib */
kPefKindObject = 4, /* .obj */
@@ -69,6 +76,8 @@ typedef struct PEFContainer final {
typedef struct PEFCommandHeader final {
Char Name[kPefNameLen]; /* container name */
+ UInt32 Cpu; /* container cpu */
+ UInt32 SubCpu; /* container sub-cpu */
UInt32 Flags; /* container flags */
UInt16 Kind; /* container kind */
UIntPtr Offset; /* content offset */
diff --git a/Private/KernelKit/PEFCodeManager.hxx b/Private/KernelKit/PEFCodeManager.hxx
index 1f5269ae..80ac6e90 100644
--- a/Private/KernelKit/PEFCodeManager.hxx
+++ b/Private/KernelKit/PEFCodeManager.hxx
@@ -45,6 +45,7 @@ class PEFLoader : public LoaderInterface {
private:
Ref<StringView> fPath;
VoidPtr fCachedBlob;
+ bool fFatBinary;
bool fBad;
};