6 /* Prepare for the case that `__builtin_expect' is not available. */
7 #if __GNUC__ == 2 && __GNUC_MINOR__ < 96
8 #define __builtin_expect(x, expected_value) (x)
11 # define likely(x) __builtin_expect((!!(x)),1)
14 # define unlikely(x) __builtin_expect((!!(x)),0)
16 #ifndef __LINUX_COMPILER_H
17 #define __LINUX_COMPILER_H
20 /* Pull in compiler and arch stuff */
23 /* Pull in the arch specific type information */
24 #include <sys/types.h>
25 /* Pull in the ldso syscalls and string functions */
26 #include <dl-syscall.h>
27 #include <dl-string.h>
28 /* Pull in the arch specific page size */
29 #include <bits/uClibc_page.h>
30 /* Now the ldso specific headers */
34 /* Global variables used within the shared library loader */
35 extern char *_dl_library_path; /* Where we look for libraries */
36 extern char *_dl_preload; /* Things to be loaded before the libs */
37 extern char *_dl_ldsopath; /* Where the shared lib loader was found */
38 extern const char *_dl_progname; /* The name of the executable being run */
39 extern unsigned char *_dl_malloc_addr; /* Lets _dl_malloc use the already allocated memory page */
40 extern unsigned char *_dl_mmap_zero; /* Also used by _dl_malloc */
41 extern unsigned long *_dl_brkp; /* The end of the data segment for brk and sbrk */
42 extern unsigned long *_dl_envp; /* The environment address */
43 extern int _dl_secure; /* Are we dealing with setuid stuff? */
44 extern size_t _dl_pagesize; /* Store the page size for use later */
45 extern const char *_dl_progname; /* The name of the shared library loader */
47 #ifdef __SUPPORT_LD_DEBUG__
48 extern char *_dl_debug;
49 extern char *_dl_debug_symbols;
50 extern char *_dl_debug_move;
51 extern char *_dl_debug_reloc;
52 extern char *_dl_debug_detail;
53 extern char *_dl_debug_nofixups;
54 extern char *_dl_debug_bindings;
55 extern int _dl_debug_file;
57 #define _dl_debug_file 2
61 #define NULL ((void *) 0)
64 extern void *_dl_malloc(int size);
65 extern char *_dl_getenv(const char *symbol, char **envp);
66 extern void _dl_unsetenv(const char *symbol, char **envp);
67 extern char *_dl_strdup(const char *string);
68 extern void _dl_dprintf(int, const char *, ...);
70 extern void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
71 Elf32_auxv_t auxvt[AT_EGID + 1], char **envp,
72 unsigned char *malloc_buffer, unsigned char *mmap_zero, char **argv);