1
Fork 0
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:
Andreas Kling 2018-10-25 10:00:37 +02:00
parent ec1d16b307
commit 16f318408d
14 changed files with 80 additions and 24 deletions

View file

@ -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
View 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))

View file

@ -1,5 +1,6 @@
#pragma once
#include "Compiler.h"
#include "Types.h"
namespace AK {

View file

@ -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" {

View file

@ -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);