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