Avoid dereferencing map->end().
[binutils.git] / include / elf / cris.h
blob8225baa414ad0700ee481a4e1d456b59da16bb47
1 /* CRIS ELF support for BFD.
2 Copyright 2000, 2001, 2004 Free Software Foundation, Inc.
3 Contributed by Axis Communications AB, Lund, Sweden.
4 Written by Hans-Peter Nilsson.
6 This file is part of BFD, the Binary File Descriptor library.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software Foundation, Inc.,
20 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
22 #ifndef _ELF_CRIS_H
23 #define _ELF_CRIS_H
25 #include "elf/reloc-macros.h"
27 /* Relocations. */
28 START_RELOC_NUMBERS (elf_cris_reloc_type)
29 RELOC_NUMBER (R_CRIS_NONE, 0)
30 RELOC_NUMBER (R_CRIS_8, 1)
31 RELOC_NUMBER (R_CRIS_16, 2)
32 RELOC_NUMBER (R_CRIS_32, 3)
34 /* The "PC" position is the location right after the relocation. */
35 RELOC_NUMBER (R_CRIS_8_PCREL, 4)
36 RELOC_NUMBER (R_CRIS_16_PCREL, 5)
37 RELOC_NUMBER (R_CRIS_32_PCREL, 6)
39 RELOC_NUMBER (R_CRIS_GNU_VTINHERIT, 7)
40 RELOC_NUMBER (R_CRIS_GNU_VTENTRY, 8)
42 /* Copy contents at dynlinking. Generated by the linker.
43 The BFD equivalent is BFD_RELOC_CRIS_COPY. */
44 RELOC_NUMBER (R_CRIS_COPY, 9)
46 /* Create GOT entry. Generated by the linker.
47 The BFD equivalent is BFD_RELOC_CRIS_GLOB_DAT. */
48 RELOC_NUMBER (R_CRIS_GLOB_DAT, 10)
50 /* Create PLT entry. Generated by the linker.
51 The BFD equivalent is BFD_RELOC_CRIS_JUMP_SLOT. */
52 RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11)
54 /* Adjust by program base. Generated by the linker.
55 The BFD equivalent is BFD_RELOC_CRIS_RELATIVE. */
56 RELOC_NUMBER (R_CRIS_RELATIVE, 12)
58 /* A 16-bit offset to entry in GOT and request to create GOT entry for
59 that symbol.
60 The BFD equivalent is BFD_RELOC_CRIS_16_GOT. */
61 RELOC_NUMBER (R_CRIS_16_GOT, 13)
63 /* A 32-bit offset to entry in GOT and request to create GOT entry for
64 that symbol.
65 The BFD equivalent is BFD_RELOC_CRIS_32_GOT. */
66 RELOC_NUMBER (R_CRIS_32_GOT, 14)
68 /* A 16-bit offset to entry in PLT part of GOT and request to create PLT
69 entry for that symbol.
70 The BFD equivalent is BFD_RELOC_CRIS_16_GOTPLT. */
71 RELOC_NUMBER (R_CRIS_16_GOTPLT, 15)
73 /* A 32-bit offset to entry in PLT part of GOT and request to create PLT
74 entry for that symbol.
75 The BFD equivalent is BFD_RELOC_CRIS_32_GOTPLT. */
76 RELOC_NUMBER (R_CRIS_32_GOTPLT, 16)
78 /* A 32-bit offset from GOT to (local) symbol: no GOT entry should be
79 necessary.
80 The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */
81 RELOC_NUMBER (R_CRIS_32_GOTREL, 17)
83 /* A 32-bit offset from GOT to entry for this symbol in PLT and request
84 to create PLT entry for symbol.
85 The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */
86 RELOC_NUMBER (R_CRIS_32_PLT_GOTREL, 18)
88 /* A 32-bit offset from location after this relocation (addend specifies
89 offset) to entry for this symbol in PLT and request to create PLT
90 entry for symbol.
91 The BFD equivalent is BFD_RELOC_CRIS_32_PLT_PCREL. */
92 RELOC_NUMBER (R_CRIS_32_PLT_PCREL, 19)
94 /* No other relocs must be visible outside the assembler. */
96 END_RELOC_NUMBERS (R_CRIS_max)
98 /* User symbols in this file have a leading underscore. */
99 #define EF_CRIS_UNDERSCORE 0x00000001
101 /* This is a mask for different incompatible machine variants. */
102 #define EF_CRIS_VARIANT_MASK 0x0000000e
104 /* Variant 0; may contain v0..10 object. */
105 #define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000
107 /* Variant 1; contains v32 object. */
108 #define EF_CRIS_VARIANT_V32 0x00000002
110 /* Variant 2; contains object compatible with v32 and v10. */
111 #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
113 #endif /* _ELF_CRIS_H */