@@ -36,7 +36,7 @@ class MachInfo {
3636 off_t fat_offset {0 }; // additional fat offset
3737 size_t memory_size {HeaderSize}; // memory size
3838 bool kaslr_slide_set {false }; // kaslr can be null, used for disambiguation
39- bool allow_decompress {true }; // allows mach decompression
39+ bool allow_decompress {true }; // allows mach decompression
4040
4141 /* *
4242 * 16 byte IDT descriptor, used for 32 and 64 bits kernels (64 bit capable cpus!)
@@ -114,7 +114,7 @@ class MachInfo {
114114 */
115115 void processMachHeader (void *header);
116116
117- MachInfo (bool asKernel= false ) : isKernel(asKernel) {
117+ MachInfo (bool asKernel, const char *id ) : isKernel(asKernel), objectId(id ) {
118118 DBGLOG (" mach @ MachInfo asKernel %d object constructed" , asKernel);
119119 }
120120 MachInfo (const MachInfo &) = delete ;
@@ -131,6 +131,11 @@ class MachInfo {
131131 * Representation mode (kernel/kext)
132132 */
133133 EXPORT const bool isKernel;
134+
135+ /* *
136+ * Specified file identifier
137+ */
138+ const char *objectId {nullptr };
134139
135140 /* *
136141 * MachInfo object generator
@@ -139,7 +144,7 @@ class MachInfo {
139144 *
140145 * @return MachInfo object or nullptr
141146 */
142- static MachInfo *create (bool asKernel=false ) { return new MachInfo (asKernel); }
147+ static MachInfo *create (bool asKernel=false , const char *id= nullptr ) { return new MachInfo (asKernel, id ); }
143148 static void deleter (MachInfo *i) { delete i; }
144149
145150 /* *
0 commit comments