mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 18:37:35 +00:00
LibDl: Move the dlfcn
implementation to LibC
This commit is contained in:
parent
27bfb81702
commit
226608a48f
9 changed files with 77 additions and 81 deletions
32
Userland/Libraries/LibC/dlfcn.h
Normal file
32
Userland/Libraries/LibC/dlfcn.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define RTLD_DEFAULT 0
|
||||
#define RTLD_LAZY 2
|
||||
#define RTLD_NOW 4
|
||||
#define RTLD_GLOBAL 8
|
||||
#define RTLD_LOCAL 16
|
||||
|
||||
typedef struct __Dl_info {
|
||||
char const* dli_fname;
|
||||
void* dli_fbase;
|
||||
char const* dli_sname;
|
||||
void* dli_saddr;
|
||||
} Dl_info;
|
||||
|
||||
int dlclose(void*);
|
||||
char* dlerror(void);
|
||||
void* dlopen(char const*, int);
|
||||
void* dlsym(void*, char const*);
|
||||
int dladdr(void*, Dl_info*);
|
||||
|
||||
__END_DECLS
|
Loading…
Add table
Add a link
Reference in a new issue