xref: /openbsd-src/gnu/usr.bin/binutils-2.17/include/elf/hppa.h (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod /* HPPA ELF support for BFD.
2*3d8817e4Smiod    Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2005
3*3d8817e4Smiod    Free Software Foundation, Inc.
4*3d8817e4Smiod 
5*3d8817e4Smiod This file is part of BFD, the Binary File Descriptor library.
6*3d8817e4Smiod 
7*3d8817e4Smiod This program is free software; you can redistribute it and/or modify
8*3d8817e4Smiod it under the terms of the GNU General Public License as published by
9*3d8817e4Smiod the Free Software Foundation; either version 2 of the License, or
10*3d8817e4Smiod (at your option) any later version.
11*3d8817e4Smiod 
12*3d8817e4Smiod This program is distributed in the hope that it will be useful,
13*3d8817e4Smiod but WITHOUT ANY WARRANTY; without even the implied warranty of
14*3d8817e4Smiod MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*3d8817e4Smiod GNU General Public License for more details.
16*3d8817e4Smiod 
17*3d8817e4Smiod You should have received a copy of the GNU General Public License
18*3d8817e4Smiod along with this program; if not, write to the Free Software
19*3d8817e4Smiod Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
20*3d8817e4Smiod 
21*3d8817e4Smiod /* This file holds definitions specific to the HPPA ELF ABI.  Note
22*3d8817e4Smiod    that most of this is not actually implemented by BFD.  */
23*3d8817e4Smiod 
24*3d8817e4Smiod #ifndef _ELF_HPPA_H
25*3d8817e4Smiod #define _ELF_HPPA_H
26*3d8817e4Smiod 
27*3d8817e4Smiod /* Processor specific flags for the ELF header e_flags field.  */
28*3d8817e4Smiod 
29*3d8817e4Smiod /* Trap null address dereferences.  */
30*3d8817e4Smiod #define EF_PARISC_TRAPNIL	0x00010000
31*3d8817e4Smiod 
32*3d8817e4Smiod /* .PARISC.archext section is present.  */
33*3d8817e4Smiod #define EF_PARISC_EXT		0x00020000
34*3d8817e4Smiod 
35*3d8817e4Smiod /* Program expects little-endian mode.  */
36*3d8817e4Smiod #define EF_PARISC_LSB		0x00040000
37*3d8817e4Smiod 
38*3d8817e4Smiod /* Program expects wide mode.  */
39*3d8817e4Smiod #define EF_PARISC_WIDE		0x00080000
40*3d8817e4Smiod 
41*3d8817e4Smiod /* Do not allow kernel-assisted branch prediction.  */
42*3d8817e4Smiod #define EF_PARISC_NO_KABP	0x00100000
43*3d8817e4Smiod 
44*3d8817e4Smiod /* Allow lazy swap for dynamically allocated program segments.  */
45*3d8817e4Smiod #define EF_PARISC_LAZYSWAP	0x00400000
46*3d8817e4Smiod 
47*3d8817e4Smiod /* Architecture version */
48*3d8817e4Smiod #define EF_PARISC_ARCH		0x0000ffff
49*3d8817e4Smiod 
50*3d8817e4Smiod #define EFA_PARISC_1_0			0x020b
51*3d8817e4Smiod #define EFA_PARISC_1_1			0x0210
52*3d8817e4Smiod #define EFA_PARISC_2_0			0x0214
53*3d8817e4Smiod 
54*3d8817e4Smiod /* Special section indices.  */
55*3d8817e4Smiod /* A symbol that has been declared as a tentative definition in an ANSI C
56*3d8817e4Smiod    compilation.  */
57*3d8817e4Smiod #define SHN_PARISC_ANSI_COMMON 	0xff00
58*3d8817e4Smiod 
59*3d8817e4Smiod /* A symbol that has been declared as a common block using the
60*3d8817e4Smiod    huge memory model.  */
61*3d8817e4Smiod #define SHN_PARISC_HUGE_COMMON	0xff01
62*3d8817e4Smiod 
63*3d8817e4Smiod /* Processor specific section types.  */
64*3d8817e4Smiod 
65*3d8817e4Smiod /* Section contains product specific extension bits.  */
66*3d8817e4Smiod #define SHT_PARISC_EXT		0x70000000
67*3d8817e4Smiod 
68*3d8817e4Smiod /* Section contains unwind table entries.  */
69*3d8817e4Smiod #define SHT_PARISC_UNWIND	0x70000001
70*3d8817e4Smiod 
71*3d8817e4Smiod /* Section contains debug information for optimized code.  */
72*3d8817e4Smiod #define SHT_PARISC_DOC		0x70000002
73*3d8817e4Smiod 
74*3d8817e4Smiod /* Section contains code annotations.  */
75*3d8817e4Smiod #define SHT_PARISC_ANNOT	0x70000003
76*3d8817e4Smiod 
77*3d8817e4Smiod /* DLKM special section.  */
78*3d8817e4Smiod #define SHT_PARISC_DLKM		0x70000004
79*3d8817e4Smiod 
80*3d8817e4Smiod /* These are strictly for compatibility with the older elf32-hppa
81*3d8817e4Smiod    implementation.  Hopefully we can eliminate them in the future.  */
82*3d8817e4Smiod /* Optional section holding argument location/relocation info.  */
83*3d8817e4Smiod #define SHT_PARISC_SYMEXTN    SHT_LOPROC+8
84*3d8817e4Smiod 
85*3d8817e4Smiod /* Option section for linker stubs.  */
86*3d8817e4Smiod #define SHT_PARISC_STUBS      SHT_LOPROC+9
87*3d8817e4Smiod 
88*3d8817e4Smiod /* Processor specific section flags.  */
89*3d8817e4Smiod 
90*3d8817e4Smiod /* Section contains code compiled for static branch prediction.  */
91*3d8817e4Smiod #define SHF_PARISC_SBP		0x80000000
92*3d8817e4Smiod 
93*3d8817e4Smiod /* Section should be allocated from from GP.  */
94*3d8817e4Smiod #define SHF_PARISC_HUGE		0x40000000
95*3d8817e4Smiod 
96*3d8817e4Smiod /* Section should go near GP.  */
97*3d8817e4Smiod #define SHF_PARISC_SHORT	0x20000000
98*3d8817e4Smiod 
99*3d8817e4Smiod /* Section is weak ordered.  */
100*3d8817e4Smiod #define SHF_PARISC_WEAKORDER	0x10000000
101*3d8817e4Smiod 
102*3d8817e4Smiod /* Identifies the entry point of a millicode routine.  */
103*3d8817e4Smiod #define STT_PARISC_MILLI	13
104*3d8817e4Smiod 
105*3d8817e4Smiod /* ELF/HPPA relocation types */
106*3d8817e4Smiod 
107*3d8817e4Smiod /* Note: PA-ELF is defined to use only RELA relocations.  */
108*3d8817e4Smiod #include "elf/reloc-macros.h"
109*3d8817e4Smiod 
110*3d8817e4Smiod START_RELOC_NUMBERS (elf_hppa_reloc_type)
111*3d8817e4Smiod RELOC_NUMBER (R_PARISC_NONE,	         0) /* No reloc */
112*3d8817e4Smiod 
113*3d8817e4Smiod /*		Data / Inst. Format	   Relocation Expression	  */
114*3d8817e4Smiod 
115*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR32,	   	 1)
116*3d8817e4Smiod /*		32-bit word            	   symbol + addend    		  */
117*3d8817e4Smiod 
118*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR21L,	   	 2)
119*3d8817e4Smiod /*		long immediate (7)	   LR(symbol, addend) 		  */
120*3d8817e4Smiod 
121*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR17R,	   	 3)
122*3d8817e4Smiod /*		branch external (19)	   RR(symbol, addend) 		  */
123*3d8817e4Smiod 
124*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR17F,	   	 4)
125*3d8817e4Smiod /*		branch external (19)	   symbol + addend    		  */
126*3d8817e4Smiod 
127*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR14R,	   	 6)
128*3d8817e4Smiod /*		load/store (1)		   RR(symbol, addend) 		  */
129*3d8817e4Smiod 
130*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR14F,	   	 7)
131*3d8817e4Smiod /*		load/store (1)		   symbol, addend 		  */
132*3d8817e4Smiod 
133*3d8817e4Smiod /* PC-relative relocation types
134*3d8817e4Smiod    Typically used for calls.
135*3d8817e4Smiod    Note PCREL17C and PCREL17F differ only in overflow handling.
136*3d8817e4Smiod    PCREL17C never reports a relocation error.
137*3d8817e4Smiod 
138*3d8817e4Smiod    When supporting argument relocations, function calls must be
139*3d8817e4Smiod    accompanied by parameter relocation information.  This information is
140*3d8817e4Smiod    carried in the ten high-order bits of the addend field.  The remaining
141*3d8817e4Smiod    22 bits of of the addend field are sign-extended to form the Addend.
142*3d8817e4Smiod 
143*3d8817e4Smiod    Note the code to build argument relocations depends on the
144*3d8817e4Smiod    addend being zero.  A consequence of this limitation is GAS
145*3d8817e4Smiod    can not perform relocation reductions for function symbols.  */
146*3d8817e4Smiod 
147*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL12F,  	 8)
148*3d8817e4Smiod /*		op & branch (17)	   symbol - PC - 8 + addend    	  */
149*3d8817e4Smiod 
150*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL32,   	 9)
151*3d8817e4Smiod /*		32-bit word		   symbol - PC - 8 + addend    	  */
152*3d8817e4Smiod 
153*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL21L,  	10)
154*3d8817e4Smiod /*		long immediate (7)	   L(symbol - PC - 8 + addend) 	  */
155*3d8817e4Smiod 
156*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL17R,  	11)
157*3d8817e4Smiod /*		branch external (19)	   R(symbol - PC - 8 + addend) 	  */
158*3d8817e4Smiod 
159*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL17F,  	12)
160*3d8817e4Smiod /*		branch (20)		   symbol - PC - 8 + addend    	  */
161*3d8817e4Smiod 
162*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL17C,  	13)
163*3d8817e4Smiod /*		branch (20)		   symbol - PC - 8 + addend    	  */
164*3d8817e4Smiod 
165*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL14R,  	14)
166*3d8817e4Smiod /*		load/store (1)		   R(symbol - PC - 8 + addend) 	  */
167*3d8817e4Smiod 
168*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL14F,  	15)
169*3d8817e4Smiod /*		load/store (1)             symbol - PC - 8 + addend    	  */
170*3d8817e4Smiod 
171*3d8817e4Smiod 
172*3d8817e4Smiod /* DP-relative relocation types.  */
173*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DPREL21L,  	18)
174*3d8817e4Smiod /*		long immediate (7)         LR(symbol - GP, addend)  	  */
175*3d8817e4Smiod 
176*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DPREL14WR, 	19)
177*3d8817e4Smiod /*		load/store mod. comp. (2)  RR(symbol - GP, addend)  	  */
178*3d8817e4Smiod 
179*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DPREL14DR, 	20)
180*3d8817e4Smiod /*		load/store doubleword (3)  RR(symbol - GP, addend)  	  */
181*3d8817e4Smiod 
182*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DPREL14R,  	22)
183*3d8817e4Smiod /*		load/store (1)             RR(symbol - GP, addend)  	  */
184*3d8817e4Smiod 
185*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DPREL14F,  	23)
186*3d8817e4Smiod /*		load/store (1)             symbol - GP + addend     	  */
187*3d8817e4Smiod 
188*3d8817e4Smiod 
189*3d8817e4Smiod /* Data linkage table (DLT) relocation types
190*3d8817e4Smiod 
191*3d8817e4Smiod    SOM DLT_REL fixup requests are used to for static data references
192*3d8817e4Smiod    from position-independent code within shared libraries.  They are
193*3d8817e4Smiod    similar to the GOT relocation types in some SVR4 implementations.  */
194*3d8817e4Smiod 
195*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTREL21L,     	26)
196*3d8817e4Smiod /*		long immediate (7)         LR(symbol - GP, addend) 	  */
197*3d8817e4Smiod 
198*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTREL14R,     	30)
199*3d8817e4Smiod /*		load/store (1)             RR(symbol - GP, addend) 	  */
200*3d8817e4Smiod 
201*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTREL14F,     	31)
202*3d8817e4Smiod /*		load/store (1)             symbol - GP + addend    	  */
203*3d8817e4Smiod 
204*3d8817e4Smiod 
205*3d8817e4Smiod /* DLT indirect relocation types  */
206*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTIND21L,     	34)
207*3d8817e4Smiod /*		long immediate (7)         L(ltoff(symbol + addend)) 	  */
208*3d8817e4Smiod 
209*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTIND14R,     	38)
210*3d8817e4Smiod /*		load/store (1)             R(ltoff(symbol + addend)) 	  */
211*3d8817e4Smiod 
212*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTIND14F,     	39)
213*3d8817e4Smiod /*		load/store (1)             ltoff(symbol + addend)    	  */
214*3d8817e4Smiod 
215*3d8817e4Smiod 
216*3d8817e4Smiod /* Base relative relocation types.  Ugh.  These imply lots of state */
217*3d8817e4Smiod RELOC_NUMBER (R_PARISC_SETBASE,       	40)
218*3d8817e4Smiod /*		none                       no reloc; base := sym     	  */
219*3d8817e4Smiod 
220*3d8817e4Smiod RELOC_NUMBER (R_PARISC_SECREL32,      	41)
221*3d8817e4Smiod /*		32-bit word                symbol - SECT + addend    	  */
222*3d8817e4Smiod 
223*3d8817e4Smiod RELOC_NUMBER (R_PARISC_BASEREL21L,    	42)
224*3d8817e4Smiod /*		long immediate (7)         LR(symbol - base, addend) 	  */
225*3d8817e4Smiod 
226*3d8817e4Smiod RELOC_NUMBER (R_PARISC_BASEREL17R,    	43)
227*3d8817e4Smiod /*		branch external (19)       RR(symbol - base, addend) 	  */
228*3d8817e4Smiod 
229*3d8817e4Smiod RELOC_NUMBER (R_PARISC_BASEREL17F,    	44)
230*3d8817e4Smiod /*		branch external (19)       symbol - base + addend    	  */
231*3d8817e4Smiod 
232*3d8817e4Smiod RELOC_NUMBER (R_PARISC_BASEREL14R,    	46)
233*3d8817e4Smiod /*		load/store (1)             RR(symbol - base, addend) 	  */
234*3d8817e4Smiod 
235*3d8817e4Smiod RELOC_NUMBER (R_PARISC_BASEREL14F,    	47)
236*3d8817e4Smiod /*		load/store (1)             symbol - base, addend     	  */
237*3d8817e4Smiod 
238*3d8817e4Smiod 
239*3d8817e4Smiod /* Segment relative relocation types.  */
240*3d8817e4Smiod RELOC_NUMBER (R_PARISC_SEGBASE,       	48)
241*3d8817e4Smiod /*		none                       no relocation; SB := sym  	  */
242*3d8817e4Smiod 
243*3d8817e4Smiod RELOC_NUMBER (R_PARISC_SEGREL32,      	49)
244*3d8817e4Smiod /*		32-bit word                symbol - SB + addend 	  */
245*3d8817e4Smiod 
246*3d8817e4Smiod 
247*3d8817e4Smiod /* Offsets from the PLT.  */
248*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLTOFF21L,     	50)
249*3d8817e4Smiod /*		long immediate (7)         LR(pltoff(symbol), addend) 	  */
250*3d8817e4Smiod 
251*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLTOFF14R,     	54)
252*3d8817e4Smiod /*		load/store (1)             RR(pltoff(symbol), addend) 	  */
253*3d8817e4Smiod 
254*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLTOFF14F,     	55)
255*3d8817e4Smiod /*		load/store (1)             pltoff(symbol) + addend    	  */
256*3d8817e4Smiod 
257*3d8817e4Smiod 
258*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR32,  	57)
259*3d8817e4Smiod /*		32-bit word                ltoff(fptr(symbol+addend))     */
260*3d8817e4Smiod 
261*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR21L, 	58)
262*3d8817e4Smiod /*		long immediate (7)         L(ltoff(fptr(symbol+addend)))  */
263*3d8817e4Smiod 
264*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR14R, 	62)
265*3d8817e4Smiod /*		load/store (1)             R(ltoff(fptr(symbol+addend)))  */
266*3d8817e4Smiod 
267*3d8817e4Smiod 
268*3d8817e4Smiod RELOC_NUMBER (R_PARISC_FPTR64,        	64)
269*3d8817e4Smiod /*		64-bit doubleword          fptr(symbol+addend) 		  */
270*3d8817e4Smiod 
271*3d8817e4Smiod 
272*3d8817e4Smiod /* Plabel relocation types.  */
273*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLABEL32,      	65)
274*3d8817e4Smiod /*		32-bit word	  	   fptr(symbol) 		  */
275*3d8817e4Smiod 
276*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLABEL21L,     	66)
277*3d8817e4Smiod /*		long immediate (7)         L(fptr(symbol))		  */
278*3d8817e4Smiod 
279*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLABEL14R,     	70)
280*3d8817e4Smiod /*		load/store (1)             R(fptr(symbol))		  */
281*3d8817e4Smiod 
282*3d8817e4Smiod 
283*3d8817e4Smiod /* PCREL relocations.  */
284*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL64,       	72)
285*3d8817e4Smiod /*		64-bit doubleword          symbol - PC - 8 + addend       */
286*3d8817e4Smiod 
287*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL22C,      	73)
288*3d8817e4Smiod /*		branch & link (21)         symbol - PC - 8 + addend       */
289*3d8817e4Smiod 
290*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL22F,      	74)
291*3d8817e4Smiod /*		branch & link (21)         symbol - PC - 8 + addend       */
292*3d8817e4Smiod 
293*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL14WR,     	75)
294*3d8817e4Smiod /*		load/store mod. comp. (2)  R(symbol - PC - 8 + addend)    */
295*3d8817e4Smiod 
296*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL14DR,     	76)
297*3d8817e4Smiod /*		load/store doubleword (3)  R(symbol - PC - 8 + addend)    */
298*3d8817e4Smiod 
299*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL16F,      	77)
300*3d8817e4Smiod /*		load/store (1)             symbol - PC - 8 + addend       */
301*3d8817e4Smiod 
302*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL16WF,     	78)
303*3d8817e4Smiod /*		load/store mod. comp. (2)  symbol - PC - 8 + addend       */
304*3d8817e4Smiod 
305*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PCREL16DF,     	79)
306*3d8817e4Smiod /*		load/store doubleword (3)  symbol - PC - 8 + addend       */
307*3d8817e4Smiod 
308*3d8817e4Smiod 
309*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR64,         	80)
310*3d8817e4Smiod /*		64-bit doubleword          symbol + addend    		  */
311*3d8817e4Smiod 
312*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR14WR,       	83)
313*3d8817e4Smiod /*		load/store mod. comp. (2)  RR(symbol, addend) 		  */
314*3d8817e4Smiod 
315*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR14DR,       	84)
316*3d8817e4Smiod /*		load/store doubleword (3)  RR(symbol, addend) 		  */
317*3d8817e4Smiod 
318*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR16F,        	85)
319*3d8817e4Smiod /*		load/store (1)             symbol + addend    		  */
320*3d8817e4Smiod 
321*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR16WF,       	86)
322*3d8817e4Smiod /*		load/store mod. comp. (2)  symbol + addend    		  */
323*3d8817e4Smiod 
324*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DIR16DF,       	87)
325*3d8817e4Smiod /*		load/store doubleword (3)  symbol + addend    		  */
326*3d8817e4Smiod 
327*3d8817e4Smiod RELOC_NUMBER (R_PARISC_GPREL64,       	88)
328*3d8817e4Smiod /*		64-bit doubleword          symbol - GP + addend 	  */
329*3d8817e4Smiod 
330*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTREL14WR,    	91)
331*3d8817e4Smiod /*		load/store mod. comp. (2)  RR(symbol - GP, addend) 	  */
332*3d8817e4Smiod 
333*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTREL14DR,    	92)
334*3d8817e4Smiod /*		load/store doubleword (3)  RR(symbol - GP, addend) 	  */
335*3d8817e4Smiod 
336*3d8817e4Smiod RELOC_NUMBER (R_PARISC_GPREL16F,      	93)
337*3d8817e4Smiod /*		load/store (1)             symbol - GP + addend    	  */
338*3d8817e4Smiod 
339*3d8817e4Smiod RELOC_NUMBER (R_PARISC_GPREL16WF,     	94)
340*3d8817e4Smiod /*		load/store mod. comp. (2)  symbol - GP + addend    	  */
341*3d8817e4Smiod 
342*3d8817e4Smiod RELOC_NUMBER (R_PARISC_GPREL16DF,     	95)
343*3d8817e4Smiod /*		load/store doubleword (3)  symbol - GP + addend    	  */
344*3d8817e4Smiod 
345*3d8817e4Smiod 
346*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF64,      	96)
347*3d8817e4Smiod /*		64-bit doubleword          ltoff(symbol + addend)    	  */
348*3d8817e4Smiod 
349*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTIND14WR,   	99)
350*3d8817e4Smiod /*		load/store mod. comp. (2)  R(ltoff(symbol + addend)) 	  */
351*3d8817e4Smiod 
352*3d8817e4Smiod RELOC_NUMBER (R_PARISC_DLTIND14DR,     100)
353*3d8817e4Smiod /*		load/store doubleword (3)  R(ltoff(symbol + addend)) 	  */
354*3d8817e4Smiod 
355*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF16F,       101)
356*3d8817e4Smiod /*		load/store (1)             ltoff(symbol + addend)    	  */
357*3d8817e4Smiod 
358*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF16WF,      102)
359*3d8817e4Smiod /*		load/store mod. comp. (2)  ltoff(symbol + addend)    	  */
360*3d8817e4Smiod 
361*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF16DF,      103)
362*3d8817e4Smiod /*		load/store doubleword (3)  ltoff(symbol + addend)    	  */
363*3d8817e4Smiod 
364*3d8817e4Smiod 
365*3d8817e4Smiod RELOC_NUMBER (R_PARISC_SECREL64,       104)
366*3d8817e4Smiod /*		64-bit doubleword          symbol - SECT + addend 	  */
367*3d8817e4Smiod 
368*3d8817e4Smiod RELOC_NUMBER (R_PARISC_BASEREL14WR,    107)
369*3d8817e4Smiod /*		load/store mod. comp. (2)  RR(symbol - base, addend) 	  */
370*3d8817e4Smiod 
371*3d8817e4Smiod RELOC_NUMBER (R_PARISC_BASEREL14DR,    108)
372*3d8817e4Smiod /*		load/store doubleword (3)  RR(symbol - base, addend) 	  */
373*3d8817e4Smiod 
374*3d8817e4Smiod 
375*3d8817e4Smiod RELOC_NUMBER (R_PARISC_SEGREL64,       112)
376*3d8817e4Smiod /*		64-bit doubleword          symbol - SB + addend 	  */
377*3d8817e4Smiod 
378*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLTOFF14WR,     115)
379*3d8817e4Smiod /*		load/store mod. comp. (2)  RR(pltoff(symbol), addend) 	  */
380*3d8817e4Smiod 
381*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLTOFF14DR,     116)
382*3d8817e4Smiod /*		load/store doubleword (3)  RR(pltoff(symbol), addend) 	  */
383*3d8817e4Smiod 
384*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLTOFF16F,      117)
385*3d8817e4Smiod /*		load/store (1)             pltoff(symbol) + addend    	  */
386*3d8817e4Smiod 
387*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLTOFF16WF,     118)
388*3d8817e4Smiod /*		load/store mod. comp. (2)  pltoff(symbol) + addend    	  */
389*3d8817e4Smiod 
390*3d8817e4Smiod RELOC_NUMBER (R_PARISC_PLTOFF16DF,     119)
391*3d8817e4Smiod /*		load/store doubleword (3)  pltoff(symbol) + addend    	  */
392*3d8817e4Smiod 
393*3d8817e4Smiod 
394*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR64,   120)
395*3d8817e4Smiod /*		64-bit doubleword          ltoff(fptr(symbol+addend))     */
396*3d8817e4Smiod 
397*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR14WR, 123)
398*3d8817e4Smiod /*		load/store mod. comp. (2)  R(ltoff(fptr(symbol+addend)))  */
399*3d8817e4Smiod 
400*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR14DR, 124)
401*3d8817e4Smiod /*		load/store doubleword (3)  R(ltoff(fptr(symbol+addend)))  */
402*3d8817e4Smiod 
403*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR16F,  125)
404*3d8817e4Smiod /*		load/store (1)             ltoff(fptr(symbol+addend))     */
405*3d8817e4Smiod 
406*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR16WF, 126)
407*3d8817e4Smiod /*		load/store mod. comp. (2)  ltoff(fptr(symbol+addend))     */
408*3d8817e4Smiod 
409*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_FPTR16DF, 127)
410*3d8817e4Smiod /*		load/store doubleword (3)  ltoff(fptr(symbol+addend))     */
411*3d8817e4Smiod 
412*3d8817e4Smiod 
413*3d8817e4Smiod RELOC_NUMBER (R_PARISC_COPY, 	       128)
414*3d8817e4Smiod /*		data                       Dynamic relocations only 	  */
415*3d8817e4Smiod 
416*3d8817e4Smiod RELOC_NUMBER (R_PARISC_IPLT, 	       129)
417*3d8817e4Smiod /*		plt                                                 	  */
418*3d8817e4Smiod 
419*3d8817e4Smiod RELOC_NUMBER (R_PARISC_EPLT, 	       130)
420*3d8817e4Smiod /*		plt                                                 	  */
421*3d8817e4Smiod 
422*3d8817e4Smiod 
423*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL32,        153)
424*3d8817e4Smiod /*		32-bit word                symbol - TP + addend    	  */
425*3d8817e4Smiod 
426*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL21L,       154)
427*3d8817e4Smiod /*		long immediate (7)         LR(symbol - TP, addend) 	  */
428*3d8817e4Smiod 
429*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL14R,       158)
430*3d8817e4Smiod /*		load/store (1)             RR(symbol - TP, addend) 	  */
431*3d8817e4Smiod 
432*3d8817e4Smiod 
433*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP21L,    162)
434*3d8817e4Smiod /*		long immediate (7)         L(ltoff(symbol - TP + addend)) */
435*3d8817e4Smiod 
436*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP14R,    166)
437*3d8817e4Smiod /*		load/store (1)             R(ltoff(symbol - TP + addend)) */
438*3d8817e4Smiod 
439*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP14F,    167)
440*3d8817e4Smiod /*		load/store (1)             ltoff(symbol - TP + addend)    */
441*3d8817e4Smiod 
442*3d8817e4Smiod 
443*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL64,        216)
444*3d8817e4Smiod /*		64-bit word                symbol - TP + addend        	  */
445*3d8817e4Smiod 
446*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL14WR,      219)
447*3d8817e4Smiod /*		load/store mod. comp. (2)  RR(symbol - TP, addend)     	  */
448*3d8817e4Smiod 
449*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL14DR,      220)
450*3d8817e4Smiod /*		load/store doubleword (3)  RR(symbol - TP, addend)     	  */
451*3d8817e4Smiod 
452*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL16F,       221)
453*3d8817e4Smiod /*		load/store (1)             symbol - TP + addend        	  */
454*3d8817e4Smiod 
455*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL16WF,      222)
456*3d8817e4Smiod /*		load/store mod. comp. (2)  symbol - TP + addend        	  */
457*3d8817e4Smiod 
458*3d8817e4Smiod RELOC_NUMBER (R_PARISC_TPREL16DF,      223)
459*3d8817e4Smiod /*		load/store doubleword (3)  symbol - TP + addend        	  */
460*3d8817e4Smiod 
461*3d8817e4Smiod 
462*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP64,     224)
463*3d8817e4Smiod /*		64-bit doubleword          ltoff(symbol - TP + addend)    */
464*3d8817e4Smiod 
465*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP14WR,   227)
466*3d8817e4Smiod /*		load/store mod. comp. (2)  R(ltoff(symbol - TP + addend)) */
467*3d8817e4Smiod 
468*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP14DR,   228)
469*3d8817e4Smiod /*		load/store doubleword (3)  R(ltoff(symbol - TP + addend)) */
470*3d8817e4Smiod 
471*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP16F,    229)
472*3d8817e4Smiod /*		load/store (1)             ltoff(symbol - TP + addend)    */
473*3d8817e4Smiod 
474*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP16WF,   230)
475*3d8817e4Smiod /*		load/store mod. comp. (2)  ltoff(symbol - TP + addend)    */
476*3d8817e4Smiod 
477*3d8817e4Smiod RELOC_NUMBER (R_PARISC_LTOFF_TP16DF,   231)
478*3d8817e4Smiod /*		load/store doubleword (3)  ltoff(symbol - TP + addend)    */
479*3d8817e4Smiod 
480*3d8817e4Smiod RELOC_NUMBER (R_PARISC_GNU_VTENTRY,    232)
481*3d8817e4Smiod RELOC_NUMBER (R_PARISC_GNU_VTINHERIT,  233)
482*3d8817e4Smiod 
483*3d8817e4Smiod END_RELOC_NUMBERS (R_PARISC_UNIMPLEMENTED)
484*3d8817e4Smiod 
485*3d8817e4Smiod #ifndef RELOC_MACROS_GEN_FUNC
486*3d8817e4Smiod typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
487*3d8817e4Smiod #endif
488*3d8817e4Smiod 
489*3d8817e4Smiod #define PT_PARISC_ARCHEXT	0x70000000
490*3d8817e4Smiod #define PT_PARISC_UNWIND	0x70000001
491*3d8817e4Smiod #define PT_PARISC_WEAKORDER	0x70000002
492*3d8817e4Smiod 
493*3d8817e4Smiod /* Flag bits in sh_flags of ElfXX_Shdr.  */
494*3d8817e4Smiod #define SHF_HP_TLS              0x01000000
495*3d8817e4Smiod #define SHF_HP_NEAR_SHARED      0x02000000
496*3d8817e4Smiod #define SHF_HP_FAR_SHARED       0x04000000
497*3d8817e4Smiod #define SHF_HP_COMDAT           0x08000000
498*3d8817e4Smiod #define SHF_HP_CONST            0x00800000
499*3d8817e4Smiod 
500*3d8817e4Smiod /* Reserved section header indices.  */
501*3d8817e4Smiod #define SHN_TLS_COMMON          (SHN_LOOS + 0x0)
502*3d8817e4Smiod #define SHN_NS_COMMON           (SHN_LOOS + 0x1)
503*3d8817e4Smiod #define SHN_FS_COMMON           (SHN_LOOS + 0x2)
504*3d8817e4Smiod #define SHN_NS_UNDEF            (SHN_LOOS + 0x3)
505*3d8817e4Smiod #define SHN_FS_UNDEF            (SHN_LOOS + 0x4)
506*3d8817e4Smiod #define SHN_HP_EXTERN           (SHN_LOOS + 0x5)
507*3d8817e4Smiod #define SHN_HP_EXTHINT          (SHN_LOOS + 0x6)
508*3d8817e4Smiod #define SHN_HP_UNDEF_BIND_IMM   (SHN_LOOS + 0x7)
509*3d8817e4Smiod 
510*3d8817e4Smiod /* Values of sh_type in ElfXX_Shdr.  */
511*3d8817e4Smiod #define SHT_HP_OVLBITS  (SHT_LOOS + 0x0)
512*3d8817e4Smiod #define SHT_HP_DLKM     (SHT_LOOS + 0x1)
513*3d8817e4Smiod #define SHT_HP_COMDAT   (SHT_LOOS + 0x2)
514*3d8817e4Smiod #define SHT_HP_OBJDICT  (SHT_LOOS + 0x3)
515*3d8817e4Smiod #define SHT_HP_ANNOT    (SHT_LOOS + 0x4)
516*3d8817e4Smiod 
517*3d8817e4Smiod /* Flag bits in p_flags of ElfXX_Phdr.  */
518*3d8817e4Smiod #define PF_HP_CODE		0x00040000
519*3d8817e4Smiod #define PF_HP_MODIFY		0x00080000
520*3d8817e4Smiod #define PF_HP_PAGE_SIZE		0x00100000
521*3d8817e4Smiod #define PF_HP_FAR_SHARED	0x00200000
522*3d8817e4Smiod #define PF_HP_NEAR_SHARED	0x00400000
523*3d8817e4Smiod #define PF_HP_LAZYSWAP		0x00800000
524*3d8817e4Smiod #define PF_HP_CODE_DEPR		0x01000000
525*3d8817e4Smiod #define PF_HP_MODIFY_DEPR	0x02000000
526*3d8817e4Smiod #define PF_HP_LAZYSWAP_DEPR	0x04000000
527*3d8817e4Smiod #define PF_PARISC_SBP		0x08000000
528*3d8817e4Smiod #define PF_HP_SBP		0x08000000
529*3d8817e4Smiod 
530*3d8817e4Smiod 
531*3d8817e4Smiod /* Processor specific dynamic array tags.  */
532*3d8817e4Smiod 
533*3d8817e4Smiod /* Arggh.  HP's tools define these symbols based on the
534*3d8817e4Smiod    old value of DT_LOOS.  So we must do the same to be
535*3d8817e4Smiod    compatible.  */
536*3d8817e4Smiod #define DT_HP_LOAD_MAP		(OLD_DT_LOOS + 0x0)
537*3d8817e4Smiod #define DT_HP_DLD_FLAGS		(OLD_DT_LOOS + 0x1)
538*3d8817e4Smiod #define DT_HP_DLD_HOOK		(OLD_DT_LOOS + 0x2)
539*3d8817e4Smiod #define DT_HP_UX10_INIT		(OLD_DT_LOOS + 0x3)
540*3d8817e4Smiod #define DT_HP_UX10_INITSZ	(OLD_DT_LOOS + 0x4)
541*3d8817e4Smiod #define DT_HP_PREINIT		(OLD_DT_LOOS + 0x5)
542*3d8817e4Smiod #define DT_HP_PREINITSZ		(OLD_DT_LOOS + 0x6)
543*3d8817e4Smiod #define DT_HP_NEEDED		(OLD_DT_LOOS + 0x7)
544*3d8817e4Smiod #define DT_HP_TIME_STAMP	(OLD_DT_LOOS + 0x8)
545*3d8817e4Smiod #define DT_HP_CHECKSUM		(OLD_DT_LOOS + 0x9)
546*3d8817e4Smiod #define DT_HP_GST_SIZE		(OLD_DT_LOOS + 0xa)
547*3d8817e4Smiod #define DT_HP_GST_VERSION	(OLD_DT_LOOS + 0xb)
548*3d8817e4Smiod #define DT_HP_GST_HASHVAL	(OLD_DT_LOOS + 0xc)
549*3d8817e4Smiod #define DT_HP_EPLTREL		(OLD_DT_LOOS + 0xd)
550*3d8817e4Smiod #define DT_HP_EPLTRELSZ		(OLD_DT_LOOS + 0xe)
551*3d8817e4Smiod #define DT_HP_FILTERED		(OLD_DT_LOOS + 0xf)
552*3d8817e4Smiod #define DT_HP_FILTER_TLS	(OLD_DT_LOOS + 0x10)
553*3d8817e4Smiod #define DT_HP_COMPAT_FILTERED	(OLD_DT_LOOS + 0x11)
554*3d8817e4Smiod #define DT_HP_LAZYLOAD		(OLD_DT_LOOS + 0x12)
555*3d8817e4Smiod #define DT_HP_BIND_NOW_COUNT	(OLD_DT_LOOS + 0x13)
556*3d8817e4Smiod #define DT_PLT			(OLD_DT_LOOS + 0x14)
557*3d8817e4Smiod #define DT_PLT_SIZE		(OLD_DT_LOOS + 0x15)
558*3d8817e4Smiod #define DT_DLT			(OLD_DT_LOOS + 0x16)
559*3d8817e4Smiod #define DT_DLT_SIZE		(OLD_DT_LOOS + 0x17)
560*3d8817e4Smiod 
561*3d8817e4Smiod /* Values for DT_HP_DLD_FLAGS.  */
562*3d8817e4Smiod #define DT_HP_DEBUG_PRIVATE		0x00001 /* Map text private */
563*3d8817e4Smiod #define DT_HP_DEBUG_CALLBACK		0x00002 /* Callback */
564*3d8817e4Smiod #define DT_HP_DEBUG_CALLBACK_BOR	0x00004 /* BOR callback */
565*3d8817e4Smiod #define DT_HP_NO_ENVVAR			0x00008 /* No env var */
566*3d8817e4Smiod #define DT_HP_BIND_NOW			0x00010 /* Bind now */
567*3d8817e4Smiod #define DT_HP_BIND_NONFATAL		0x00020 /* Bind non-fatal */
568*3d8817e4Smiod #define DT_HP_BIND_VERBOSE		0x00040 /* Bind verbose */
569*3d8817e4Smiod #define DT_HP_BIND_RESTRICTED		0x00080 /* Bind restricted */
570*3d8817e4Smiod #define DT_HP_BIND_SYMBOLIC		0x00100 /* Bind symbolic */
571*3d8817e4Smiod #define DT_HP_RPATH_FIRST		0x00200 /* RPATH first */
572*3d8817e4Smiod #define DT_HP_BIND_DEPTH_FIRST		0x00400 /* Bind depth-first */
573*3d8817e4Smiod #define DT_HP_GST			0x00800 /* Dld global sym table */
574*3d8817e4Smiod #define DT_HP_SHLIB_FIXED		0x01000 /* shared vtable support */
575*3d8817e4Smiod #define DT_HP_MERGE_SHLIB_SEG		0x02000 /* merge shlib data segs */
576*3d8817e4Smiod #define DT_HP_NODELETE			0x04000 /* never unload */
577*3d8817e4Smiod #define DT_HP_GROUP			0x08000 /* bind only within group */
578*3d8817e4Smiod #define DT_HP_PROTECT_LINKAGE_TABLE	0x10000 /* protected linkage table */
579*3d8817e4Smiod 
580*3d8817e4Smiod /* Program header extensions.  */
581*3d8817e4Smiod #define PT_HP_TLS		(PT_LOOS + 0x0)
582*3d8817e4Smiod #define PT_HP_CORE_NONE		(PT_LOOS + 0x1)
583*3d8817e4Smiod #define PT_HP_CORE_VERSION	(PT_LOOS + 0x2)
584*3d8817e4Smiod #define PT_HP_CORE_KERNEL	(PT_LOOS + 0x3)
585*3d8817e4Smiod #define PT_HP_CORE_COMM		(PT_LOOS + 0x4)
586*3d8817e4Smiod #define PT_HP_CORE_PROC		(PT_LOOS + 0x5)
587*3d8817e4Smiod #define PT_HP_CORE_LOADABLE	(PT_LOOS + 0x6)
588*3d8817e4Smiod #define PT_HP_CORE_STACK	(PT_LOOS + 0x7)
589*3d8817e4Smiod #define PT_HP_CORE_SHM		(PT_LOOS + 0x8)
590*3d8817e4Smiod #define PT_HP_CORE_MMF		(PT_LOOS + 0x9)
591*3d8817e4Smiod #define PT_HP_PARALLEL		(PT_LOOS + 0x10)
592*3d8817e4Smiod #define PT_HP_FASTBIND		(PT_LOOS + 0x11)
593*3d8817e4Smiod #define PT_HP_OPT_ANNOT		(PT_LOOS + 0x12)
594*3d8817e4Smiod #define PT_HP_HSL_ANNOT		(PT_LOOS + 0x13)
595*3d8817e4Smiod #define PT_HP_STACK		(PT_LOOS + 0x14)
596*3d8817e4Smiod #define PT_HP_CORE_UTSNAME	(PT_LOOS + 0x15)
597*3d8817e4Smiod 
598*3d8817e4Smiod /* Binding information.  */
599*3d8817e4Smiod #define STB_HP_ALIAS		(STB_LOOS + 0x0)
600*3d8817e4Smiod 
601*3d8817e4Smiod /* Additional symbol types.  */
602*3d8817e4Smiod #define STT_HP_OPAQUE		(STT_LOOS + 0x1)
603*3d8817e4Smiod #define STT_HP_STUB		(STT_LOOS + 0x2)
604*3d8817e4Smiod 
605*3d8817e4Smiod /* Note types.  */
606*3d8817e4Smiod #define NT_HP_COMPILER		1
607*3d8817e4Smiod #define NT_HP_COPYRIGHT		2
608*3d8817e4Smiod #define NT_HP_VERSION		3
609*3d8817e4Smiod #define NT_HP_SRCFILE_INFO	4
610*3d8817e4Smiod #define NT_HP_LINKER		5
611*3d8817e4Smiod #define NT_HP_INSTRUMENTED	6
612*3d8817e4Smiod #define NT_HP_UX_OPTIONS	7
613*3d8817e4Smiod 
614*3d8817e4Smiod #endif /* _ELF_HPPA_H */
615