fix the use of uninitialized value in regcomp
[musl.git] / include / link.h
blob9349cddd5da7de4f7fa3e2abbda8cdad07d47151
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 /* this is the same everywhere except alpha and s390 */
20 typedef uint32_t Elf_Symndx;
22 struct dl_phdr_info {
23 ElfW(Addr) dlpi_addr;
24 const char *dlpi_name;
25 const ElfW(Phdr) *dlpi_phdr;
26 ElfW(Half) dlpi_phnum;
27 unsigned long long int dlpi_adds;
28 unsigned long long int dlpi_subs;
29 size_t dlpi_tls_modid;
30 void *dlpi_tls_data;
33 struct link_map {
34 ElfW(Addr) l_addr;
35 char *l_name;
36 ElfW(Dyn) *l_ld;
37 struct link_map *l_next, *l_prev;
40 struct r_debug {
41 int r_version;
42 struct link_map *r_map;
43 ElfW(Addr) r_brk;
44 enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state;
45 ElfW(Addr) r_ldbase;
48 int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *), void *);
50 #ifdef __cplusplus
52 #endif
54 #endif