diff options
Diffstat (limited to 'dev/kernel/KernelKit')
| -rw-r--r-- | dev/kernel/KernelKit/IDylibObject.h | 2 | ||||
| -rw-r--r-- | dev/kernel/KernelKit/IPEFDylibObject.h | 14 | ||||
| -rw-r--r-- | dev/kernel/KernelKit/ZXD.h | 11 |
3 files changed, 14 insertions, 13 deletions
diff --git a/dev/kernel/KernelKit/IDylibObject.h b/dev/kernel/KernelKit/IDylibObject.h index b673766c..3727e938 100644 --- a/dev/kernel/KernelKit/IDylibObject.h +++ b/dev/kernel/KernelKit/IDylibObject.h @@ -41,5 +41,5 @@ class IDylibObject { }; /// @brief Pure implementation, missing method/function handler. -EXTERN_C void __zka_pure_call(void); +EXTERN_C void __ne_pure_call(void); } // namespace Kernel diff --git a/dev/kernel/KernelKit/IPEFDylibObject.h b/dev/kernel/KernelKit/IPEFDylibObject.h index 66b4895d..5788138d 100644 --- a/dev/kernel/KernelKit/IPEFDylibObject.h +++ b/dev/kernel/KernelKit/IPEFDylibObject.h @@ -7,8 +7,8 @@ * ======================================================== */ -#ifndef __KERNELKIT_SHARED_OBJECT_H__ -#define __KERNELKIT_SHARED_OBJECT_H__ +#ifndef __KERNELKIT_PEF_SHARED_OBJECT_H__ +#define __KERNELKIT_PEF_SHARED_OBJECT_H__ #include <KernelKit/IDylibObject.h> #include <KernelKit/PEF.h> @@ -38,7 +38,7 @@ class IPEFDylibObject final NE_DYLIB_OBJECT { DylibTraits* Get() { return fMounted; } public: - void Mount(DylibTraits* to_mount) { + void Mount(DylibTraits* to_mount) noexcept { if (!to_mount || !to_mount->ImageObject) return; fMounted = to_mount; @@ -53,19 +53,19 @@ class IPEFDylibObject final NE_DYLIB_OBJECT { } } - void Unmount() { + void Unmount() noexcept { if (fMounted) fMounted = nullptr; }; template <typename SymbolType> - SymbolType Load(const Char* symbol_name, SizeT len, Int32 kind) { + SymbolType Load(const Char* symbol_name, const SizeT& len, const UInt32& kind) { if (symbol_name == nullptr || *symbol_name == 0) return nullptr; if (len > kPathLen || len < 1) return nullptr; auto ret = reinterpret_cast<SymbolType>(fLoader->FindSymbol(symbol_name, kind).Leak().Leak()); if (!ret) { - if (kind == kPefCode) return (VoidPtr) &__zka_pure_call; + if (kind == kPefCode) return (VoidPtr) &__ne_pure_call; return nullptr; } @@ -83,4 +83,4 @@ EXTERN_C IDylibRef rtl_init_dylib_pef(USER_PROCESS& header); EXTERN_C Void rtl_fini_dylib_pef(USER_PROCESS& header, IDylibRef lib, Bool* successful); } // namespace Kernel -#endif /* ifndef __KERNELKIT_SHARED_OBJECT_H__ */ +#endif /* ifndef __KERNELKIT_PEF_SHARED_OBJECT_H__ */ diff --git a/dev/kernel/KernelKit/ZXD.h b/dev/kernel/KernelKit/ZXD.h index 10af568b..f1c99a21 100644 --- a/dev/kernel/KernelKit/ZXD.h +++ b/dev/kernel/KernelKit/ZXD.h @@ -8,15 +8,16 @@ #include <NeKit/Defines.h> -namespace ZXD { -using namespace Kernel; +#define kZXDMagicNumber (0x2010AF) +#define kZXDVersion (0x0001) +namespace Kernel { struct ZXD_EXEC_HEADER; struct ZXD_STUB_HEADER; /// @brief ZXD executable header /// @details This header is used to identify ZXD executable files. -struct ZXD_EXEC_HEADER { +struct PACKED ZXD_EXEC_HEADER { UInt32 fMagic; UInt32 fVersion; UInt32 fFlags; @@ -35,9 +36,9 @@ struct ZXD_EXEC_HEADER { /// @brief ZXD stub header /// @details This header is used to identify ZXD stub files. It contains the size of the stub, the /// offset of the stub, and the CRC32 checksum of the stub. -struct ZXD_STUB_HEADER { +struct PACKED ZXD_STUB_HEADER { UInt32 fStubSize; UInt32 fStubOffset; UInt32 fStubCRC32; }; -} // namespace ZXD
\ No newline at end of file +} // namespace Kernel |
