diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-01 17:08:13 +0000 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-01 17:08:13 +0000 |
| commit | 5c59cd35a2fa3e620542b73e8c3f66f0dccd241c (patch) | |
| tree | 985e7e39fd9657ceb45ab292f6a934e0e6d4571b /Private/Source/PEFSharedObjectMain.cxx | |
| parent | 6c4cc0dba681fef1cef3c31877653a1d6413fc90 (diff) | |
| parent | 6ce7dffe92775f262384a028af233999a7d18048 (diff) | |
Merge branch 'HCR-9-add-support-for-file-load-hel-amd64' into 'trunk'
See below.
See merge request mahrouss-logic/micro-kernel!2
Diffstat (limited to 'Private/Source/PEFSharedObjectMain.cxx')
| -rw-r--r-- | Private/Source/PEFSharedObjectMain.cxx | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/Private/Source/PEFSharedObjectMain.cxx b/Private/Source/PEFSharedObjectMain.cxx deleted file mode 100644 index c1803312..00000000 --- a/Private/Source/PEFSharedObjectMain.cxx +++ /dev/null @@ -1,58 +0,0 @@ -/* - * ======================================================== - * - * HCore - * Copyright Mahrouss Logic, all rights reserved. - * - * ======================================================== - */ - -#include <KernelKit/DebugOutput.hpp> -#include <KernelKit/PEF.hpp> -#include <KernelKit/ProcessManager.hpp> -#include <KernelKit/PEFSharedObject.hxx> -#include <KernelKit/ThreadLocalStorage.hxx> -#include <NewKit/Defines.hpp> - -using namespace HCore; - -/***********************************************************************************/ -/// @file SharedObjectEntry.cxx -/// @brief Shared Object Init code. -/***********************************************************************************/ - -/***********************************************************************************/ -/* @brief Allocate new library to be added to the lookup table. - */ -/***********************************************************************************/ - -extern "C" SharedObject *__LibMain(VoidPtr image) { - SharedObject *library = hcore_tls_new_class<SharedObject>(); - - if (!library) { - kcout << "__LibMain: Out of Memory!\n"; - ProcessManager::Shared().Leak().GetCurrent().Leak().Crash(); - - return nullptr; - } - - library->Mount(hcore_tls_new_class<SharedObject::SharedObjectTraits>()); - - if (!library->Get()) { - kcout << "__LibMain: Out of Memory!\n"; - ProcessManager::Shared().Leak().GetCurrent().Leak().Crash(); - - return nullptr; - } - - library->Get()->fImageObject = - ProcessManager::Shared().Leak().GetCurrent().Leak().Image; - - library->Get()->fImageEntrypointOffset = library->Load<VoidPtr>(kPefStart); - - kcout << "__LibMain: Done jumping to library...\n"; - - return library; -} - -/***********************************************************************************/ |
