LibC: Define Dl_info_t and add stub for dladdr

This commit is contained in:
2025-08-17 22:56:16 +03:00
parent 0bece8a54c
commit 36cb3d56fe
2 changed files with 20 additions and 0 deletions

View File

@@ -15,6 +15,18 @@ __BEGIN_DECLS
#define RTLD_NEXT ((void*)-1)
#define RTLD_DEFAULT ((void*) 0)
struct Dl_info
{
const char* dli_fname; /* Pathname of mapped object file. */
void* dli_fbase; /* Base of mapped address range. */
const char* dli_sname; /* Sumbol name or null pointer. */
void* dli_saddr; /* Symbol address or null pointer. */
};
typedef struct Dl_info Dl_info_t; /* POSIX type */
typedef struct Dl_info Dl_info; /* Linux type */
int dladdr(const void* __restrict addr, Dl_info_t* __restrict dlip);
int dlclose(void* handle);
char* dlerror(void);
void* dlopen(const char* file, int mode);