1 #ifndef LIBC_H 2 #define LIBC_H 3 4 #include <stdlib.h> 5 #include <stdio.h> 6 #include <limits.h> 7 8 struct __locale_map; 9 10 struct __locale_struct { 11 const struct __locale_map *cat[6]; 12 }; 13 14 struct tls_module { 15 struct tls_module *next; 16 void *image; 17 size_t len, size, align, offset; 18 }; 19 20 struct __libc { 21 char can_do_threads; 22 char threaded; 23 char secure; 24 volatile signed char need_locks; 25 int threads_minus_1; 26 size_t *auxv; 27 struct tls_module *tls_head; 28 size_t tls_size, tls_align, tls_cnt; 29 size_t page_size; 30 struct __locale_struct global_locale; 31 }; 32 33 #ifndef PAGE_SIZE 34 #define PAGE_SIZE libc.page_size 35 #endif 36 37 extern hidden struct __libc __libc; 38 #define libc __libc 39 40 hidden void __init_libc(char **, char *); 41 hidden void __init_tls(size_t *); 42 hidden void __init_ssp(void *); 43 hidden void __libc_start_init(void); 44 hidden void __funcs_on_exit(void); 45 hidden void __funcs_on_quick_exit(void); 46 hidden void __libc_exit_fini(void); 47 hidden void __fork_handler(int); 48 49 extern hidden size_t __hwcap; 50 extern hidden size_t __sysinfo; 51 extern char *__progname, *__progname_full; 52 53 extern hidden const char __libc_version[]; 54 55 hidden void __synccall(void (*)(void *), void *); 56 hidden int __setxid(int, int, int, int); 57 58 #endif 59