mirror of
https://github.com/Fennix-Project/Userspace.git
synced 2025-07-10 22:59:22 +00:00
Update libc
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
build:
|
||||
cp include/* ../out/system/include
|
||||
make --quiet -C runtime build
|
||||
make --quiet -C libgcc build
|
||||
make --quiet -C src build
|
||||
|
11
libc/include/dlfcn.h
Normal file
11
libc/include/dlfcn.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef __FENNIX_LIBC_DLFCN_H__
|
||||
#define __FENNIX_LIBC_DLFCN_H__
|
||||
|
||||
#include <types.h>
|
||||
|
||||
void *dlopen(const char *filename, int flags);
|
||||
void *dlsym(void *handle, const char *symbol);
|
||||
int dlclose(void *handle);
|
||||
char *dlerror(void);
|
||||
|
||||
#endif // !__FENNIX_LIBC_DLFCN_H__
|
@ -0,0 +1,6 @@
|
||||
#ifndef __FENNIX_LIBC_TYPES_H__
|
||||
#define __FENNIX_LIBC_TYPES_H__
|
||||
|
||||
#define NULL ((void *)0)
|
||||
|
||||
#endif // !__FENNIX_LIBC_TYPES_H__
|
||||
|
0
libc/runtime/crti.c
Normal file
0
libc/runtime/crti.c
Normal file
0
libc/runtime/crtn.c
Normal file
0
libc/runtime/crtn.c
Normal file
23
libc/src/dlfcn.c
Normal file
23
libc/src/dlfcn.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
static char *error = "Not implemented";
|
||||
|
||||
__attribute__((weak)) void *dlopen(const char *filename, int flags)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void *dlsym(void *handle, const char *symbol)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__attribute__((weak)) int dlclose(void *handle)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
__attribute__((weak)) char *dlerror(void)
|
||||
{
|
||||
return error;
|
||||
}
|
Reference in New Issue
Block a user