-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelfdlmap.h
38 lines (30 loc) · 1.07 KB
/
elfdlmap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef CEXP_DLMAP_H
#define CEXP_DLMAP_H
#include <stdint.h>
/* build a link map reflecting the current executable
* and all shared libraries it depends on.
*/
typedef struct CexpLinkMapRec_ *CexpLinkMap;
/* If string table is 'static' */
#define CEXP_LINK_MAP_STATIC_STRINGS (1<<0)
typedef struct CexpLinkMapRec_ {
CexpLinkMap next; /* linked list */
void *elfsyms;
const char *strtab;
const char *name; /* optional; may be empty */
unsigned long nsyms;
unsigned long firstsym; /* if there is a gnu hashtable then */
/* all undefined or local symbols are first */
uintptr_t offset; /* offset by which symbol values may need */
/* to be adjusted. */
int flags;
} CexpLinkMapRec;
/* Build a link map
* 'name' is currently unused and must be NULL
* to select the currently executing programm
*/
CexpLinkMap
cexpLinkMapBuild(const char *name, void *parm);
void
cexpLinkMapFree(CexpLinkMap m);
#endif