Skip to content

Commit

Permalink
dlfcn: create header
Browse files Browse the repository at this point in the history
JIRA: RTOS-664
  • Loading branch information
badochov committed Aug 16, 2024
1 parent 9fe5f55 commit 2caa8d8
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions include/dlfcn.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Phoenix-RTOS
*
* libphoenix
*
* dlfcn.h
*
* Copyright 2024 Phoenix Systems
* Author: Hubert Badocha
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/

#ifndef _LIBPHOENIX_DLFCN_H_
#define _LIBPHOENIX_DLFCN_H_


#ifdef __cplusplus
extern "C" {
#endif


#define RTLD_LAZY 1
#define RTLD_NOW 2
#define RTLD_GLOBAL 0x100
#define RTLD_LOCAL 0x200


typedef struct {
const char *dli_fname; /* Pathname of mapped object file. */
void *dli_fbase; /* Base of mapped address range. */
const char *dli_sname; /* Symbol name or null pointer. */
void *dli_saddr; /* Symbol address or null pointer. */
} Dl_info_t;


int dladdr(const void *restrict, Dl_info_t *restrict);
int dlclose(void *);
char *dlerror(void);
void *dlopen(const char *, int);
void *dlsym(void *restrict, const char *restrict);


#ifdef __cplusplus
}
#endif


#endif

0 comments on commit 2caa8d8

Please sign in to comment.