Replace FSF snail mail address by URL.
[glibc.git] / sysdeps / unix / sysv / linux / arm / ldsodefs.h
blob839dc18929a99d5552f2e4ffad3db05bbe6a58e4
1 /* Run-time dynamic linker data structures for loaded ELF shared objects.
2 Copyright (C) 2010 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
27 #ifdef __ARM_EABI__
28 #define EXTRA_OSABI ELFOSABI_ARM_AEABI
29 #else
30 #define EXTRA_OSABI ELFOSABI_ARM
31 #endif
33 #define VALID_ELF_HEADER(hdr,exp,size) \
34 (memcmp (hdr, exp, size) == 0 \
35 || memcmp (hdr, expected2, size) == 0 \
36 || memcmp (hdr, expected3, size) == 0)
37 #define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV \
38 || osabi == EXTRA_OSABI \
39 || osabi == ELFOSABI_LINUX)
40 #define MORE_ELF_HEADER_DATA \
41 static const unsigned char expected2[EI_PAD] = \
42 { \
43 [EI_MAG0] = ELFMAG0, \
44 [EI_MAG1] = ELFMAG1, \
45 [EI_MAG2] = ELFMAG2, \
46 [EI_MAG3] = ELFMAG3, \
47 [EI_CLASS] = ELFW(CLASS), \
48 [EI_DATA] = byteorder, \
49 [EI_VERSION] = EV_CURRENT, \
50 [EI_OSABI] = ELFOSABI_LINUX \
51 }; \
52 static const unsigned char expected3[EI_PAD] = \
53 { \
54 [EI_MAG0] = ELFMAG0, \
55 [EI_MAG1] = ELFMAG1, \
56 [EI_MAG2] = ELFMAG2, \
57 [EI_MAG3] = ELFMAG3, \
58 [EI_CLASS] = ELFW(CLASS), \
59 [EI_DATA] = byteorder, \
60 [EI_VERSION] = EV_CURRENT, \
61 [EI_OSABI] = EXTRA_OSABI \
64 #endif