diff options
Diffstat (limited to 'ELFLoader/ExecSpace.cpp')
-rw-r--r-- | ELFLoader/ExecSpace.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ELFLoader/ExecSpace.cpp b/ELFLoader/ExecSpace.cpp index fb6d55a0dd..cbcc8568a5 100644 --- a/ELFLoader/ExecSpace.cpp +++ b/ELFLoader/ExecSpace.cpp @@ -22,7 +22,9 @@ int puts(const char* str) void ExecSpace::initializeBuiltins() { +#ifndef SERENITY m_symbols.set("puts", { (char*)puts, 0 }); +#endif } #ifdef SERENITY @@ -86,8 +88,13 @@ char* ExecSpace::symbolPtr(const char* name) char* ExecSpace::allocateArea(String&& name, unsigned size) { - char* ptr = static_cast<char*>(kmalloc(size)); - ASSERT(ptr); + char* ptr; + if (hookableAlloc) + ptr = static_cast<char*>(hookableAlloc(name, size)); + else + ptr = static_cast<char*>(kmalloc(size)); + if (size) + ASSERT(ptr); m_areas.append(make<Area>(move(name), ptr, size)); return ptr; } |