Move all files into ports/ subdirectory in preparation for merge with glibc
[glibc.git] / ports / sysdeps / unix / sysv / linux / arm / ldsodefs.h
blob8980bb1996ddae220d3534b12457688570cab11a
1 /* Run-time dynamic linker data structures for loaded ELF shared objects.
2 Copyright (C) 2010, 2012 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef _ARM_LINUX_LDSODEFS_H
20 #define _ARM_LINUX_LDSODEFS_H 1
22 #include_next <ldsodefs.h>
24 #undef VALID_ELF_HEADER
25 #undef VALID_ELF_OSABI
26 #undef MORE_ELF_HEADER_DATA
28 #define EXTRA_OSABI ELFOSABI_ARM_AEABI
30 #define VALID_ELF_HEADER(hdr,exp,size) \
31 (memcmp (hdr, exp, size) == 0 \
32 || memcmp (hdr, expected2, size) == 0 \
33 || memcmp (hdr, expected3, size) == 0)
34 #define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV \
35 || osabi == EXTRA_OSABI \
36 || osabi == ELFOSABI_LINUX)
37 #define MORE_ELF_HEADER_DATA \
38 static const unsigned char expected2[EI_PAD] = \
39 { \
40 [EI_MAG0] = ELFMAG0, \
41 [EI_MAG1] = ELFMAG1, \
42 [EI_MAG2] = ELFMAG2, \
43 [EI_MAG3] = ELFMAG3, \
44 [EI_CLASS] = ELFW(CLASS), \
45 [EI_DATA] = byteorder, \
46 [EI_VERSION] = EV_CURRENT, \
47 [EI_OSABI] = ELFOSABI_LINUX \
48 }; \
49 static const unsigned char expected3[EI_PAD] = \
50 { \
51 [EI_MAG0] = ELFMAG0, \
52 [EI_MAG1] = ELFMAG1, \
53 [EI_MAG2] = ELFMAG2, \
54 [EI_MAG3] = ELFMAG3, \
55 [EI_CLASS] = ELFW(CLASS), \
56 [EI_DATA] = byteorder, \
57 [EI_VERSION] = EV_CURRENT, \
58 [EI_OSABI] = EXTRA_OSABI \
61 #endif