declare and make hidden additional internal stdio symbols
[musl.git] / include / link.h
blob815018594c777b1513911cc04157e71fb7572015
1 #ifndef _LINK_H
2 #define _LINK_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 #include <elf.h>
9 #define __NEED_size_t
10 #define __NEED_uint32_t
11 #include <bits/alltypes.h>
13 #if UINTPTR_MAX > 0xffffffff
14 #define ElfW(type) Elf64_ ## type
15 #else
16 #define ElfW(type) Elf32_ ## type
17 #endif
19 #include <bits/link.h>
21 struct dl_phdr_info {
22 ElfW(Addr) dlpi_addr;
23 const char *dlpi_name;
24 const ElfW(Phdr) *dlpi_phdr;
25 ElfW(Half) dlpi_phnum;
26 unsigned long long int dlpi_adds;
27 unsigned long long int dlpi_subs;
28 size_t dlpi_tls_modid;
29 void *dlpi_tls_data;
32 struct link_map {
33 ElfW(Addr) l_addr;
34 char *l_name;
35 ElfW(Dyn) *l_ld;
36 struct link_map *l_next, *l_prev;
39 struct r_debug {
40 int r_version;
41 struct link_map *r_map;
42 ElfW(Addr) r_brk;
43 enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state;
44 ElfW(Addr) r_ldbase;
47 int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *), void *);
49 #ifdef __cplusplus
51 #endif
53 #endif