OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [elfcpp/] [arm.h] - Blame information for rev 233

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
// arm.h -- ELF definitions specific to EM_ARM  -*- C++ -*-
2
 
3
// Copyright 2009, Free Software Foundation, Inc.
4
// Written by Doug Kwan <dougkwan@google.com>.
5
 
6
// This file is part of elfcpp.
7
 
8
// This program is free software; you can redistribute it and/or
9
// modify it under the terms of the GNU Library General Public License
10
// as published by the Free Software Foundation; either version 2, or
11
// (at your option) any later version.
12
 
13
// In addition to the permissions in the GNU Library General Public
14
// License, the Free Software Foundation gives you unlimited
15
// permission to link the compiled version of this file into
16
// combinations with other programs, and to distribute those
17
// combinations without any restriction coming from the use of this
18
// file.  (The Library Public License restrictions do apply in other
19
// respects; for example, they cover modification of the file, and
20
// distribution when not linked into a combined executable.)
21
 
22
// This program is distributed in the hope that it will be useful, but
23
// WITHOUT ANY WARRANTY; without even the implied warranty of
24
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25
// Library General Public License for more details.
26
 
27
// You should have received a copy of the GNU Library General Public
28
// License along with this program; if not, write to the Free Software
29
// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
30
// 02110-1301, USA.
31
 
32
#ifndef ELFCPP_ARM_H
33
#define ELFCPP_ARM_H
34
 
35
// The relocation type information is taken from:
36
//
37
//   ELF for the ARM Architecture
38
//   Document number: ARM IHI 0044C, current through ABI release 2.07
39
//   Date of Issue: 10th October, 2008
40
//
41
 
42
namespace elfcpp
43
{
44
 
45
//
46
// ARM Relocations Codes
47
//
48
 
49
// Operation notes: 
50
//   S: Address of the symbol.
51
//   A: Addend for relocation.
52
//   P: Address of the place being relocated.
53
//   Pa: Adjusted address of the place being relocated (P & 0xfffffffc)
54
//   T: is 1 if S has type STT_FUNC and the symbol addresses a Thumb
55
//      instruction.Thumb-bit; it is 0 otherwise.
56
//   B(S): Addressing origin of the output segment defining S.
57
//   GOT_ORG: Addressing origin of the Global Offset Table.
58
//   GOT(S): Address of the GOT entry for S.
59
//
60
 
61
enum
62
{
63
                                // Type         Class   Operation               
64
                                // ------------------------------
65
  R_ARM_NONE = 0,                // Static       Misc
66
  R_ARM_PC24 = 1,               // Deprecated   ARM     ((S + A) | T) - P
67
  R_ARM_ABS32 = 2,              // Static       Data    (S + A) | T
68
  R_ARM_REL32 = 3,              // Static       Data    ((S + A) | T) - P
69
  R_ARM_LDR_PC_G0 = 4,          // Static       ARM     S + A - P
70
  R_ARM_ABS16 = 5,              // Static       Data    S + A
71
  R_ARM_ABS12 = 6,              // Static       ARM     S + A
72
  R_ARM_THM_ABS5 = 7,           // Static       Thumb16 S + A
73
  R_ARM_ABS8 = 8,               // Static       Data    S + A
74
  R_ARM_SBREL32 = 9,            // Static       Data    ((S + A) | T) - B(S)
75
  R_ARM_THM_CALL = 10,          // Static       Thumb32 ((S + A) | T) - P
76
  R_ARM_THM_PC8 = 11,           // Static       Thumb16
77
  R_ARM_BREL_ADJ = 12,          // Dynamic      Data    DeltaB(S) + A
78
  R_ARM_TLS_DESC = 13,          // Dynamic      Data
79
  R_ARM_THM_SWI8 = 14,          // Obsolete
80
  R_ARM_XPC25 = 15,             // Obsolete
81
  R_ARM_THM_XPC22 = 16,         // Obsolete
82
  R_ARM_TLS_DTPMOD32 = 17,      // Dynamic      Data    Module(S)
83
  R_ARM_TLS_DTPOFF32 = 18,      // Dynamic      Data    S + A - TLS
84
  R_ARM_TLS_TPOFF32 = 19,       // Dynamic      Data    S + A - tp
85
  R_ARM_COPY = 20,              // Dynamic      Misc
86
  R_ARM_GLOB_DAT = 21,          // Dynamic      Data    (S + A) | T
87
  R_ARM_JUMP_SLOT = 22,         // Dynamic      Data    (S + A) | T
88
  R_ARM_RELATIVE = 23,          // Dynamic      Data    B(S) + A
89
  R_ARM_GOTOFF32 = 24,          // Static       Data    (((S + A) | T) - GOT_ORG
90
  R_ARM_BASE_PREL = 25,         // Static       Data    B(S) + A - P
91
  R_ARM_GOT_BREL = 26,          // Static       Data    GOT(S) + A - GOT_ORG
92
  R_ARM_PLT32 = 27,             // Deprecated   ARM     ((S + A) | T) - P
93
  R_ARM_CALL = 28,              // Static       ARM     ((S + A) | T) - P
94
  R_ARM_JUMP24 = 29,            // Static       ARM     ((S + A) | T) - P
95
  R_ARM_THM_JUMP24 = 30,        // Static       Thumb32 ((S + A) | T) - P
96
  R_ARM_BASE_ABS = 31,          // Static       Data    B(S) + A
97
  R_ARM_ALU_PCREL_7_0 = 32,     // Obsolete
98
  R_ARM_ALU_PCREL_15_8 = 33,    // Obsolete
99
  R_ARM_ALU_PCREL_23_15 = 34,   // Obsolete
100
  R_ARM_LDR_SBREL_11_0_NC = 35, // Deprecated   ARM     S + A - B(S)
101
  R_ARM_ALU_SBREL_19_12_NC = 36,// Deprecated   ARM     S + A - B(S)
102
  R_ARM_ALU_SBREL_27_20_CK = 37,// Deprecated   ARM     S + A - B(S)
103
  R_ARM_TARGET1 = 38,           // Data         Misc    (S + A) | T or
104
                                //                      ((S + A) | T) - P
105
  R_ARM_SBREL31 = 39,           // Deprecated   Data    ((S + A) | T) - B(S)
106
  R_ARM_V4BX = 40,              // Static       Misc 
107
  R_ARM_TARGET2 = 41,           // Static       Misc
108
  R_ARM_PREL31 = 42,            // Static       Data    ((S + A) | T) - P
109
  R_ARM_MOVW_ABS_NC = 43,       // Static       ARM     (S + A) | T
110
  R_ARM_MOVT_ABS = 44,          // Static       ARM     S + A
111
  R_ARM_MOVW_PREL_NC = 45,      // Static       ARM     ((S + A) | T) - P
112
  R_ARM_MOVT_PREL = 46,         // Static       ARM     S + A - P
113
  R_ARM_THM_MOVW_ABS_NC = 47,   // Static       Thumb32 (S + A) | T
114
  R_ARM_THM_MOVT_ABS = 48,      // Static       Thumb32 S + A - P
115
  R_ARM_THM_MOVW_PREL_NC =  49, // Static       Thumb32 ((S + A) | T) - P
116
  R_ARM_THM_MOVT_PREL = 50,     // Static       Thumb32 S + A - P
117
  R_ARM_THM_JUMP19 = 51,        // Static       Thumb32 ((S + A) | T) - P
118
  R_ARM_THM_JUMP6 = 52,         // Static       Thumb16 S + A - P
119
  R_ARM_THM_ALU_PREL_11_0 = 53, // Static       Thumb32 ((S + A) | T) - Pa
120
  R_ARM_THM_PC12 = 54,          // Static       Thumb32 S + A - Pa
121
  R_ARM_ABS32_NOI = 55,         // Static       Data    S + A
122
  R_ARM_REL32_NOI = 56,         // Static       Data    S + A - P
123
  R_ARM_ALU_PC_G0_NC = 57,      // Static       ARM     ((S + A) | T) - P
124
  R_ARM_ALU_PC_G0 = 58,         // Static       ARM     ((S + A) | T) - P
125
  R_ARM_ALU_PC_G1_NC = 59,      // Static       ARM     ((S + A) | T) - P
126
  R_ARM_ALU_PC_G1 = 60,         // Static       ARM     ((S + A) | T) - P
127
  R_ARM_ALU_PC_G2 = 61,         // Static       ARM     ((S + A) | T) - P
128
  R_ARM_LDR_PC_G1 = 62,         // Static       ARM     S + A - P
129
  R_ARM_LDR_PC_G2 = 63,         // Static       ARM     S + A - P
130
  R_ARM_LDRS_PC_G0 = 64,        // Static       ARM     S + A - P
131
  R_ARM_LDRS_PC_G1 = 65,        // Static       ARM     S + A - P
132
  R_ARM_LDRS_PC_G2 = 66,        // Static       ARM     S + A - P
133
  R_ARM_LDC_PC_G0 = 67,         // Static       ARM     S + A - P
134
  R_ARM_LDC_PC_G1 = 68,         // Static       ARM     S + A - P
135
  R_ARM_LDC_PC_G2 = 69,         // Static       ARM     S + A - P
136
  R_ARM_ALU_SB_G0_NC = 70,      // Static       ARM     ((S + A) | T) - B(S)
137
  R_ARM_ALU_SB_G0 = 71,         // Static       ARM     ((S + A) | T) - B(S)
138
  R_ARM_ALU_SB_G1_NC = 72,      // Static       ARM     ((S + A) | T) - B(S)
139
  R_ARM_ALU_SB_G1 = 73,         // Static       ARM     ((S + A) | T) - B(S)
140
  R_ARM_ALU_SB_G2 = 74,         // Static       ARM     ((S + A) | T) - B(S)
141
  R_ARM_LDR_SB_G0 = 75,         // Static       ARM     S + A - B(S)
142
  R_ARM_LDR_SB_G1 = 76,         // Static       ARM     S + A - B(S)
143
  R_ARM_LDR_SB_G2 = 77,         // Static       ARM     S + A - B(S)
144
  R_ARM_LDRS_SB_G0 = 78,        // Static       ARM     S + A - B(S)
145
  R_ARM_LDRS_SB_G1 = 79,        // Static       ARM     S + A - B(S)
146
  R_ARM_LDRS_SB_G2 = 80,        // Static       ARM     S + A - B(S)
147
  R_ARM_LDC_SB_G0 = 81,         // Static       ARM     S + A - B(S)
148
  R_ARM_LDC_SB_G1 = 82,         // Static       ARM     S + A - B(S)
149
  R_ARM_LDC_SB_G2 = 83,         // Static       ARM     S + A - B(S)
150
  R_ARM_MOVW_BREL_NC = 84,      // Static       ARM     ((S + A) | T) - B(S)
151
  R_ARM_MOVT_BREL = 85,         // Static       ARM     S + A - B(S)
152
  R_ARM_MOVW_BREL = 86,         // Static       ARM     ((S + A) | T) - B(S)
153
  R_ARM_THM_MOVW_BREL_NC = 87,  // Static       Thumb32 ((S + A) | T) - B(S)
154
  R_ARM_THM_MOVT_BREL = 88,     // Static       Thumb32 S + A - B(S)
155
  R_ARM_THM_MOVW_BREL = 89,     // Static       Thumb32 ((S + A) | T) - B(S)
156
  R_ARM_TLS_GOTDESC = 90,       // Static       Data
157
  R_ARM_TLS_CALL = 91,          // Static       ARM
158
  R_ARM_TLS_DESCSEQ = 92,       // Static       ARM     TLS relaxation
159
  R_ARM_THM_TLS_CALL = 93,      // Static       Thumb32
160
  R_ARM_PLT32_ABS =  94,        // Static       Data    PLT(S) + A
161
  R_ARM_GOT_ABS =  95,          // Static       Data    GOT(S) + A
162
  R_ARM_GOT_PREL = 96,          // Static       Data    GOT(S) + A - P
163
  R_ARM_GOT_BREL12 =  97,       // Static       ARM     GOT(S) + A - GOT_ORG
164
  R_ARM_GOTOFF12 =  98,         // Static       ARM     S + A - GOT_ROG
165
  R_ARM_GOTRELAX =  99,         // Static       Misc
166
  R_ARM_GNU_VTENTRY = 100,      // Deprecated   Data
167
  R_ARM_GNU_VTINHERIT = 101,    // Deprecated   Data
168
  R_ARM_THM_JUMP11 = 102,       // Static       Thumb16 S + A - P
169
  R_ARM_THM_JUMP8 = 103,        // Static       Thumb16 S + A - P
170
  R_ARM_TLS_GD32 = 104,         // Static       Data    GOT(S) + A - P
171
  R_ARM_TLS_LDM32 = 105,        // Static       Data    GOT(S) + A - P
172
  R_ARM_TLS_LDO32 = 106,        // Static       Data    S + A - TLS
173
  R_ARM_TLS_IE32 = 107,         // Static       Data    GOT(S) + A - P
174
  R_ARM_TLS_LE32 = 108,         // Static       Data    S + A - tp
175
  R_ARM_TLS_LDO12 = 109,        // Static       ARM     S + A - TLS
176
  R_ARM_TLS_LE12 = 110,         // Static       ARM     S + A - tp
177
  R_ARM_TLS_IE12GP = 111,       // Static       ARM     GOT(S) + A - GOT_ORG
178
  R_ARM_PRIVATE_0 = 112,        // Private (n = 0, 1, ... 15)
179
  R_ARM_PRIVATE_1 = 113,
180
  R_ARM_PRIVATE_2 = 114,
181
  R_ARM_PRIVATE_3 = 115,
182
  R_ARM_PRIVATE_4 = 116,
183
  R_ARM_PRIVATE_5 = 117,
184
  R_ARM_PRIVATE_6 = 118,
185
  R_ARM_PRIVATE_7 = 119,
186
  R_ARM_PRIVATE_8 = 120,
187
  R_ARM_PRIVATE_9 = 121,
188
  R_ARM_PRIVATE_10 = 122,
189
  R_ARM_PRIVATE_11 = 123,
190
  R_ARM_PRIVATE_12 = 124,
191
  R_ARM_PRIVATE_13 = 125,
192
  R_ARM_PRIVATE_14 = 126,
193
  R_ARM_PRIVATE_15 = 127,
194
  R_ARM_ME_TOO = 128,           // Obsolete
195
  R_ARM_THM_TLS_DESCSEQ16 = 129,// Static       Thumb16 
196
  R_ARM_THM_TLS_DESCSEQ32 = 130,// Static       Thumb32
197
  // 131 - 139                  Unallocated
198
  // 140 - 159                  Dynamic         Reserved for future allocation
199
  // 160 - 255                  Unallocated
200
};
201
 
202
} // End namespace elfcpp.
203
 
204
#endif // !defined(ELFCPP_ARM_H)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.