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 int can_do_threads; 22 int threaded; 23 int secure; 24 volatile int threads_minus_1; 25 size_t *auxv; 26 struct tls_module *tls_head; 27 size_t tls_size, tls_align, tls_cnt; 28 size_t page_size; 29 struct __locale_struct global_locale; 30 int exit; 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 hidden void __sig_init(void); 49 hidden void arm_do_signal(int); 50 51 extern hidden size_t __hwcap; 52 extern hidden size_t __sysinfo; 53 extern char *__progname, *__progname_full; 54 55 extern hidden const char __libc_version[]; 56 57 hidden void __synccall(void (*)(void *), void *); 58 hidden int __setxid(int, int, int, int); 59 60 #endif 61