1 |
578 |
markom |
/* CRIS ELF support for BFD.
|
2 |
|
|
Copyright 2000, 2001 Free Software Foundation, Inc.
|
3 |
|
|
Contributed by Axis Communications AB, Lund, Sweden.
|
4 |
|
|
Written by Hans-Peter Nilsson.
|
5 |
|
|
|
6 |
|
|
This file is part of BFD, the Binary File Descriptor library.
|
7 |
|
|
|
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.
|
12 |
|
|
|
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.
|
17 |
|
|
|
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 |
|
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
21 |
|
|
|
22 |
|
|
#ifndef _ELF_CRIS_H
|
23 |
|
|
#define _ELF_CRIS_H
|
24 |
|
|
|
25 |
|
|
#include "elf/reloc-macros.h"
|
26 |
|
|
|
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)
|
33 |
|
|
|
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)
|
38 |
|
|
|
39 |
|
|
RELOC_NUMBER (R_CRIS_GNU_VTINHERIT, 7)
|
40 |
|
|
RELOC_NUMBER (R_CRIS_GNU_VTENTRY, 8)
|
41 |
|
|
|
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)
|
45 |
|
|
|
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)
|
49 |
|
|
|
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)
|
53 |
|
|
|
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)
|
57 |
|
|
|
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)
|
62 |
|
|
|
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)
|
67 |
|
|
|
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)
|
72 |
|
|
|
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)
|
77 |
|
|
|
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)
|
82 |
|
|
|
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)
|
87 |
|
|
|
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)
|
93 |
|
|
|
94 |
|
|
/* No other relocs must be visible outside the assembler. */
|
95 |
|
|
|
96 |
|
|
END_RELOC_NUMBERS (R_CRIS_max)
|
97 |
|
|
|
98 |
|
|
/* User symbols in this file have a leading underscore. */
|
99 |
|
|
#define EF_CRIS_UNDERSCORE 0x00000001
|
100 |
|
|
|
101 |
|
|
#endif /* _ELF_CRIS_H */
|