mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:27:45 +00:00
ELFLoader should fail with an error message for unresolved symbols.
This commit is contained in:
parent
ec1d16b307
commit
16f318408d
14 changed files with 80 additions and 24 deletions
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef SERENITY
|
||||
#include "kassert.h"
|
||||
#include <Kernel/kassert.h>
|
||||
#else
|
||||
#include <assert.h>
|
||||
#define ASSERT(x) assert(x)
|
||||
|
|
9
AK/Compiler.h
Normal file
9
AK/Compiler.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#define PACKED __attribute__ ((packed))
|
||||
#define NORETURN __attribute__ ((noreturn))
|
||||
#define ALWAYS_INLINE __attribute__ ((always_inline))
|
||||
#define NEVER_INLINE __attribute__ ((noinline))
|
||||
#define MALLOC_ATTR __attribute__ ((malloc))
|
||||
#define PURE __attribute__ ((pure))
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Compiler.h"
|
||||
#include "Types.h"
|
||||
|
||||
namespace AK {
|
||||
|
|
|
@ -1,10 +1,20 @@
|
|||
#include <cstdio>
|
||||
#include "SimpleMalloc.h"
|
||||
#include "kmalloc.h"
|
||||
|
||||
#ifndef SERENITY
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
#if defined(SERENITY) && defined(USERLAND)
|
||||
#define USE_SYSTEM_MALLOC
|
||||
#endif
|
||||
|
||||
#define USE_SYSTEM_MALLOC
|
||||
|
||||
#ifndef USE_SYSTEM_MALLOC
|
||||
#include "SimpleMalloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_SYSTEM_MALLOC
|
||||
|
||||
extern "C" {
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef SERENITY
|
||||
#ifdef USERLAND
|
||||
#include <LibC/stdlib.h>
|
||||
#else
|
||||
#include <Kernel/kmalloc.h>
|
||||
#endif
|
||||
#else
|
||||
#include <new>
|
||||
|
||||
|
@ -10,7 +14,7 @@
|
|||
extern "C" {
|
||||
|
||||
void* kcalloc(size_t nmemb, size_t size);
|
||||
void* kmalloc(size_t size) __attribute__ ((malloc));
|
||||
void* kmalloc(size_t size) MALLOC_ATTR;
|
||||
void kfree(void* ptr);
|
||||
void* krealloc(void* ptr, size_t size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue