Added stub implementations for dl*() functions
This commit is contained in:
14
photon/libc/include/dlfcn.h
Normal file
14
photon/libc/include/dlfcn.h
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#ifndef DLFCN_H_
|
||||||
|
#define DLFCN_H_
|
||||||
|
|
||||||
|
#define RTLD_LAZY 0
|
||||||
|
#define RTLD_NOW 1
|
||||||
|
#define RTLD_GLOBAL 2
|
||||||
|
#define RTLD_LOCAL 3
|
||||||
|
|
||||||
|
extern void *dlopen(const char *path, int mode);
|
||||||
|
extern void *dlsym(void *handle, const char *name);
|
||||||
|
extern int dlclose(void *handle);
|
||||||
|
extern char *dlerror(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
30
photon/libc/sys/horizon/dlfcn.c
Normal file
30
photon/libc/sys/horizon/dlfcn.c
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#include <magenta/types.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
|
||||||
|
__attribute__((weak)) void *dyld_load_object(mx_handle_t handle, int mode) { return NULL; }
|
||||||
|
__attribute__((weak)) void *dyld_get_symbol(void *handle, const char *name) { return NULL; }
|
||||||
|
__attribute__((weak)) int dyld_close_object(void *handle) { return 0; }
|
||||||
|
__attribute__((weak)) char *dyld_get_error(void) { return NULL; }
|
||||||
|
|
||||||
|
void *dlopen(const char *path, int mode)
|
||||||
|
{
|
||||||
|
dyld_load_object(MX_NULL_HANDLE, 0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *dlsym(void *handle, const char *name)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int dlclose(void *handle)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *dlerror(void)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user