Upgrade to gcc-4.9.2
[akaros.git] / tools / compilers / gcc-glibc / glibc-2.14.1-ros / sysdeps / akaros / ldsodefs.h
1 #ifndef _AKAROS_LDSODEFS_H
2 #define _AKAROS_LDSODEFS_H
3
4 #define HAVE_AUX_VECTOR
5
6 /* More recent versions of binutils mark SysV objects as Linux objects
7  * if they use certain GNU extensions (which we do).  We could solve
8  * this problem directly by declaring and using ELFOSABI_AKAROS,
9  * but that requires changes to all of GCC, BFD, GAS and GLIBC.
10  * Instead, we take the easy way out: accept all SysV and Linux objects.
11  * Most importantly, both Kevin and Andrew concur on this matter. */
12
13 #define VALID_ELF_HEADER(hdr, exp, size) \
14   ({                                                              \
15     static const unsigned char ros_expected[EI_NIDENT] =          \
16     {                                                             \
17       [EI_MAG0] = ELFMAG0,                                        \
18       [EI_MAG1] = ELFMAG1,                                        \
19       [EI_MAG2] = ELFMAG2,                                        \
20       [EI_MAG3] = ELFMAG3,                                        \
21       [EI_CLASS] = ELFW(CLASS),                                   \
22       [EI_DATA] = byteorder,                                      \
23       [EI_VERSION] = EV_CURRENT,                                  \
24       [EI_OSABI] = ELFOSABI_LINUX,                                \
25       [EI_ABIVERSION] = 0                                         \
26     };                                                            \
27     !memcmp(hdr, ros_expected, size) || !memcmp(hdr, exp, size);  \
28   })
29
30 #define VALID_ELF_OSABI(osabi) \
31   ((osabi) == ELFOSABI_SYSV || (osabi) == ELFOSABI_LINUX)
32
33 #define VALID_ELF_ABIVERSION(osabi,ver) (ver == 0)
34
35 #include_next <ldsodefs.h>
36
37 #endif