mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:37:34 +00:00
LibC+LibELF: Implement dladdr()
This implements the dladdr() function which lets the caller look up the symbol name, symbol address as well as library name and library base address for an arbitrary address.
This commit is contained in:
parent
f82aa87d14
commit
89a38b72b7
5 changed files with 73 additions and 0 deletions
|
@ -16,9 +16,17 @@ __BEGIN_DECLS
|
|||
#define RTLD_GLOBAL 8
|
||||
#define RTLD_LOCAL 16
|
||||
|
||||
typedef struct __Dl_info {
|
||||
const char* dli_fname;
|
||||
void* dli_fbase;
|
||||
const char* dli_sname;
|
||||
void* dli_saddr;
|
||||
} Dl_info;
|
||||
|
||||
int dlclose(void*);
|
||||
char* dlerror();
|
||||
void* dlopen(const char*, int);
|
||||
void* dlsym(void*, const char*);
|
||||
int dladdr(void*, Dl_info*);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue