From df8393cebbae61ed7686be17a28d80c657f49b7e Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 8 Aug 2024 14:19:42 +0200 Subject: [IMP] Code cleanup and improvements of the bootloader, still trying to figure what is going wrong on the kernel's DLL. Signed-off-by: Amlal EL Mahrouss --- Boot/Sources/HEL/AMD64/BootMain.cxx | 6 +++--- Boot/Sources/HEL/AMD64/New+Delete.cxx | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'Boot/Sources/HEL') diff --git a/Boot/Sources/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx index 8647d00e..0e2be7ac 100644 --- a/Boot/Sources/HEL/AMD64/BootMain.cxx +++ b/Boot/Sources/HEL/AMD64/BootMain.cxx @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include // make the compiler shut up. @@ -205,7 +205,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, readerKernel.ReadAll(0); - Boot::ProgramLoader* loader = nullptr; + Boot::KernelLoader* loader = nullptr; // ------------------------------------------ // // If we succeed in reading the blob, then execute it. @@ -213,7 +213,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, if (readerKernel.Blob()) { - loader = new Boot::ProgramLoader(readerKernel.Blob()); + loader = new Boot::KernelLoader(readerKernel.Blob()); loader->SetName("\"newoskrnl.dll\" (64-bit SMP DLL)"); } diff --git a/Boot/Sources/HEL/AMD64/New+Delete.cxx b/Boot/Sources/HEL/AMD64/New+Delete.cxx index b651f091..7039f478 100644 --- a/Boot/Sources/HEL/AMD64/New+Delete.cxx +++ b/Boot/Sources/HEL/AMD64/New+Delete.cxx @@ -44,6 +44,13 @@ void operator delete(void* buf) BS->FreePool(buf); } +/// @brief Deletes the object. +/// @param buf the object. +void operator delete[](void* buf) +{ + BS->FreePool(buf); +} + /// @brief Deletes the object (array specific). /// @param buf the object. /// @param size it's size. -- cgit v1.2.3