1 /* $NetBSD: reloc.h,v 1.1 2002/06/05 01:04:23 fredette Exp $ */
3 /* $OpenBSD: reloc.h,v 1.1 1999/04/20 19:44:05 mickey Exp $ */
6 * Copyright (c) 1999 Michael Shalayeff
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
22 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef _HPPA_RELOC_H_
32 #define _HPPA_RELOC_H_
34 /* pa1 compatibility */
35 #define RELOC_DLTREL21L RELOC_GPREL21L
36 #define RELOC_DLTREL14R RELOC_GPREL14R
37 #define RELOC_DLTIND21L RELOC_LTOFF21L
38 #define RELOC_DLTIND14R RELOC_LTOFF14R
39 #define RELOC_DLTIND14F RELOC_LTOFF14F
40 #define RELOC_DLTREL14WR RELOC_GPREL14WR
41 #define RELOC_DLTREL14DR RELOC_GPREL14DR
42 #define RELOC_DLTIND14WR RELOC_LTOFF14WR
43 #define RELOC_DLTIND14DR RELOC_LTOFF14DR
48 RELOC_DIR32
, /* symbol + addend*/
49 RELOC_DIR21L
, /* LR(symbol, addend) */
50 RELOC_DIR17R
, /* RR(symbol, addend) */
51 RELOC_DIR17F
, /* symbol + addend */
52 RELOC_DIR14R
= 6, /* RR(symbol, addend) */
53 RELOC_PCREL32
= 9, /* pa2: symbol - PC - 8 + addend */
54 RELOC_PCREL21L
, /* L(symbol - PC - 8 + addend */
55 RELOC_PCREL17R
, /* R(symbol - PC - 8 + addend */
56 RELOC_PCREL17F
, /* symbol - PC - 8 + addend */
57 RELOC_PCREL17C
, /* pa1: symbol - PC - 8 + addend */
58 RELOC_PCREL14R
, /* R(symbol - PC - 8 + addend */
59 RELOC_DPREL21L
= 18, /* pa1: LR(symbol - GP, addend */
60 RELOC_DPREL14WR
, /* pa1: RR(symbol - GP, addend */
61 RELOC_DPREL14DR
, /* pa1: RR(symbol - GP, addend */
62 RELOC_DPREL14R
, /* pa1: RR(symbol - GP, addend */
63 RELOC_GPREL21L
= 26, /* LR(symbol - GP, addend */
64 RELOC_GPREL14R
= 30, /* RR(symbol - GP, addend */
65 RELOC_LTOFF21L
= 34, /* L(ltoff(symbol + addend)) */
66 RELOC_LTOFF14R
= 38, /* R(ltoff(symbol + addend)) */
67 RELOC_LTOFF14F
, /* pa1: ltoff(symbol + addend) */
68 RELOC_SETBASE
, /* no relocation; base = symbol */
69 RELOC_SECREL32
, /* symbol - SECT + addend */
70 RELOC_BASEREL21L
, /* pa1: LR(symbol - base, addend) */
71 RELOC_BASEREL17R
, /* pa1: RR(symbol - base, addend) */
72 RELOC_BASEREL14R
= 46, /* pa1: RR(symbol - base, addend) */
73 RELOC_SEGBASE
= 48, /* no relocation; SB = symbol */
74 RELOC_SEGREL32
, /* symbol - SB + addend */
75 RELOC_PLTOFF21L
, /* LR(pltoff(symbol), addend */
76 RELOC_PLTOFF14R
= 54, /* RR(pltoff(symbol), addend */
77 RELOC_PLTOFF14F
, /* pa1: pltoff(symbol) + addend */
78 RELOC_LTOFF_FPTR32
= 57,/* pa2: ltoff(fptr(symbol + addend)) */
79 RELOC_LTOFF_FPTR21L
, /* pa2: L(ltoff(fptr(symbol + addend))) */
80 RELOC_LTOFF_FPTR14R
= 62,/* pa2: R(ltoff(fptr(symbol + addend))) */
81 RELOC_FPTR64
= 64, /* pa2: fptr(symbol + addend) */
82 RELOC_PLABEL32
, /* pa1: fptr(symbol) */
83 RELOC_PCREL64
= 72, /* pa2: symbol - PC - 8 + addend */
84 RELOC_PCREL22C
, /* pa1: symbol - PC - 8 + addend */
85 RELOC_PCREL22F
, /* symbol - PC - 8 + addend */
86 RELOC_PCREL14WR
, /* R(symbol - PC - 8 + addend) */
87 RELOC_PCREL14DR
, /* R(symbol - PC - 8 + addend) */
88 RELOC_PCREL16F
, /* pa2: symbol - PC - 8 + addend */
89 RELOC_PCREL16WF
, /* pa2: symbol - PC - 8 + addend */
90 RELOC_PCREL16DF
, /* pa2: symbol - PC - 8 + addend */
91 RELOC_DIR64
, /* pa2: symbol + addend */
92 RELOC_DIR14WR
= 83, /* RR(symbol, addend) */
93 RELOC_DIR14DR
, /* RR(symbol, addend) */
94 RELOC_DIR16F
, /* pa2: symbol + addend */
95 RELOC_DIR16WF
, /* pa2: symbol + addend */
96 RELOC_DIR16DF
, /* pa2: symbol + addend */
97 RELOC_GPREL64
, /* pa2: symbol - GP + addend */
98 RELOC_GPREL14WR
= 91, /* RR(symbol - GP, addend) */
99 RELOC_GPREL14DR
, /* RR(symbol - GP, addend) */
100 RELOC_GPREL16F
, /* pa2: symbol - GP + addend */
101 RELOC_GPREL16WF
, /* pa2: symbol - GP + addend */
102 RELOC_GPREL16DF
, /* pa2: symbol - GP + addend */
103 RELOC_LTOFF64
= 96, /* pa2: ltoff(symbol + addend) */
104 RELOC_LTOFF14WR
= 99, /* R(ltoff(symbol + addend)) */
105 RELOC_LTOFF14DR
, /* R(ltoff(symbol + addend)) */
106 RELOC_LTOFF16F
, /* pa2: ltoff(symbol + addend) */
107 RELOC_LTOFF16WF
, /* pa2: ltoff(symbol + addend) */
108 RELOC_LTOFF16DF
, /* pa2: ltoff(symbol + addend) */
109 RELOC_SECREL64
, /* pa2: symbol - SECT + addend */
110 RELOC_BASEREL14WR
=107, /* pa1: RR(symbol - base, addend */
111 RELOC_BASEREL14DR
, /* pa1: RR(symbol - base, addend */
112 RELOC_SEGREL64
= 112, /* pa2: symbol - SB + addend */
113 RELOC_PLTOFF14WR
=115, /* RR(pltoff(symbol) + addend) */
114 RELOC_PLTOFF14DR
, /* RR(pltoff(symbol) + addend) */
115 RELOC_PLTOFF16F
, /* pa2: pltoff(symbol) + addend */
116 RELOC_PLTOFF16WF
, /* pa2: pltoff(symbol) + addend */
117 RELOC_PLTOFF16DF
, /* pa2: pltoff(symbol) + addend */
118 RELOC_LTOFF_FPTR64
, /* pa2: ltoff(fptr(symbol + addend)) */
119 RELOC_LTOFF_FPTR14WR
=123,/* pa2: R(ltoff(fptr(symbol + addend) */
120 RELOC_LTOFF_FPTR14DR
, /* pa2: R(ltoff(fptr(symbol + addend) */
121 RELOC_LTOFF_FPTR16F
, /* pa2: ltoff(fptr(symbol + addend)) */
122 RELOC_LTOFF_FPTR16WF
, /* pa2: ltoff(fptr(symbol + addend)) */
123 RELOC_LTOFF_FPTR16DF
, /* pa2: ltoff(fptr(symbol + addend)) */
124 RELOC_LORESERVE
, /* reserved for environment-specific use */
129 RELOC_HIRESERVE
= 255
132 #endif /* _HPPA_RELOC_H_ */