Back to index

cell-binutils  2.17cvs20070401
hppa.h
Go to the documentation of this file.
00001 /* HPPA ELF support for BFD.
00002    Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2005, 2006
00003    Free Software Foundation, Inc.
00004 
00005    This file is part of BFD, the Binary File Descriptor library.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program; if not, write to the Free Software
00019    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00020 
00021 /* This file holds definitions specific to the HPPA ELF ABI.  Note
00022    that most of this is not actually implemented by BFD.  */
00023 
00024 #ifndef _ELF_HPPA_H
00025 #define _ELF_HPPA_H
00026 
00027 /* Processor specific flags for the ELF header e_flags field.  */
00028 
00029 /* Trap null address dereferences.  */
00030 #define EF_PARISC_TRAPNIL   0x00010000
00031 
00032 /* .PARISC.archext section is present.  */
00033 #define EF_PARISC_EXT              0x00020000
00034 
00035 /* Program expects little-endian mode.  */
00036 #define EF_PARISC_LSB              0x00040000
00037 
00038 /* Program expects wide mode.  */
00039 #define EF_PARISC_WIDE             0x00080000
00040 
00041 /* Do not allow kernel-assisted branch prediction.  */
00042 #define EF_PARISC_NO_KABP   0x00100000
00043 
00044 /* Allow lazy swap for dynamically allocated program segments.  */
00045 #define EF_PARISC_LAZYSWAP  0x00400000
00046 
00047 /* Architecture version */
00048 #define EF_PARISC_ARCH             0x0000ffff
00049 
00050 #define EFA_PARISC_1_0                    0x020b
00051 #define EFA_PARISC_1_1                    0x0210
00052 #define EFA_PARISC_2_0                    0x0214
00053 
00054 /* Special section indices.  */
00055 /* A symbol that has been declared as a tentative definition in an ANSI C
00056    compilation.  */
00057 #define SHN_PARISC_ANSI_COMMON     0xff00
00058 
00059 /* A symbol that has been declared as a common block using the
00060    huge memory model.  */
00061 #define SHN_PARISC_HUGE_COMMON     0xff01
00062 
00063 /* Processor specific section types.  */
00064 
00065 /* Section contains product specific extension bits.  */
00066 #define SHT_PARISC_EXT             0x70000000
00067 
00068 /* Section contains unwind table entries.  */
00069 #define SHT_PARISC_UNWIND   0x70000001
00070 
00071 /* Section contains debug information for optimized code.  */
00072 #define SHT_PARISC_DOC             0x70000002
00073 
00074 /* Section contains code annotations.  */
00075 #define SHT_PARISC_ANNOT    0x70000003
00076 
00077 /* DLKM special section.  */
00078 #define SHT_PARISC_DLKM            0x70000004
00079 
00080 /* These are strictly for compatibility with the older elf32-hppa
00081    implementation.  Hopefully we can eliminate them in the future.  */
00082 /* Optional section holding argument location/relocation info.  */
00083 #define SHT_PARISC_SYMEXTN    SHT_LOPROC + 8
00084 
00085 /* Option section for linker stubs.  */
00086 #define SHT_PARISC_STUBS      SHT_LOPROC + 9
00087 
00088 /* Processor specific section flags.  */
00089 
00090 /* Section contains code compiled for static branch prediction.  */
00091 #define SHF_PARISC_SBP             0x80000000
00092 
00093 /* Section should be allocated from from GP.  */
00094 #define SHF_PARISC_HUGE            0x40000000
00095 
00096 /* Section should go near GP.  */
00097 #define SHF_PARISC_SHORT    0x20000000
00098 
00099 /* Section is weak ordered.  */
00100 #define SHF_PARISC_WEAKORDER       0x10000000
00101 
00102 /* Identifies the entry point of a millicode routine.  */
00103 #define STT_PARISC_MILLI    13
00104 
00105 /* ELF/HPPA relocation types */
00106 
00107 /* Note: PA-ELF is defined to use only RELA relocations.  */
00108 #include "elf/reloc-macros.h"
00109 
00110 START_RELOC_NUMBERS (elf_hppa_reloc_type)
00111 RELOC_NUMBER (R_PARISC_NONE,                0) /* No reloc */
00112 
00113 /*            Data / Inst. Format     Relocation Expression      */
00114 
00115 RELOC_NUMBER (R_PARISC_DIR32,              1)
00116 /*            32-bit word                    symbol + addend                   */
00117 
00118 RELOC_NUMBER (R_PARISC_DIR21L,             2)
00119 /*            long immediate (7)      LR(symbol, addend)                */
00120 
00121 RELOC_NUMBER (R_PARISC_DIR17R,             3)
00122 /*            branch external (19)    RR(symbol, addend)                */
00123 
00124 RELOC_NUMBER (R_PARISC_DIR17F,             4)
00125 /*            branch external (19)    symbol + addend                   */
00126 
00127 RELOC_NUMBER (R_PARISC_DIR14R,             6)
00128 /*            load/store (1)                 RR(symbol, addend)                */
00129 
00130 RELOC_NUMBER (R_PARISC_DIR14F,             7)
00131 /*            load/store (1)                 symbol, addend             */
00132 
00133 /* PC-relative relocation types
00134    Typically used for calls.
00135    Note PCREL17C and PCREL17F differ only in overflow handling.
00136    PCREL17C never reports a relocation error.
00137 
00138    When supporting argument relocations, function calls must be
00139    accompanied by parameter relocation information.  This information is
00140    carried in the ten high-order bits of the addend field.  The remaining
00141    22 bits of of the addend field are sign-extended to form the Addend.
00142 
00143    Note the code to build argument relocations depends on the
00144    addend being zero.  A consequence of this limitation is GAS
00145    can not perform relocation reductions for function symbols.  */
00146 
00147 RELOC_NUMBER (R_PARISC_PCREL12F,    8)
00148 /*            op & branch (17)        symbol - PC - 8 + addend          */
00149 
00150 RELOC_NUMBER (R_PARISC_PCREL32,     9)
00151 /*            32-bit word             symbol - PC - 8 + addend          */
00152 
00153 RELOC_NUMBER (R_PARISC_PCREL21L,   10)
00154 /*            long immediate (7)      L(symbol - PC - 8 + addend)       */
00155 
00156 RELOC_NUMBER (R_PARISC_PCREL17R,   11)
00157 /*            branch external (19)    R(symbol - PC - 8 + addend)       */
00158 
00159 RELOC_NUMBER (R_PARISC_PCREL17F,   12)
00160 /*            branch (20)             symbol - PC - 8 + addend          */
00161 
00162 RELOC_NUMBER (R_PARISC_PCREL17C,   13)
00163 /*            branch (20)             symbol - PC - 8 + addend          */
00164 
00165 RELOC_NUMBER (R_PARISC_PCREL14R,   14)
00166 /*            load/store (1)                 R(symbol - PC - 8 + addend)       */
00167 
00168 RELOC_NUMBER (R_PARISC_PCREL14F,   15)
00169 /*            load/store (1)             symbol - PC - 8 + addend       */
00170 
00171 
00172 /* DP-relative relocation types.  */
00173 RELOC_NUMBER (R_PARISC_DPREL21L,   18)
00174 /*            long immediate (7)         LR(symbol - GP, addend)        */
00175 
00176 RELOC_NUMBER (R_PARISC_DPREL14WR,  19)
00177 /*            load/store mod. comp. (2)  RR(symbol - GP, addend)        */
00178 
00179 RELOC_NUMBER (R_PARISC_DPREL14DR,  20)
00180 /*            load/store doubleword (3)  RR(symbol - GP, addend)        */
00181 
00182 RELOC_NUMBER (R_PARISC_DPREL14R,   22)
00183 /*            load/store (1)             RR(symbol - GP, addend)        */
00184 
00185 RELOC_NUMBER (R_PARISC_DPREL14F,   23)
00186 /*            load/store (1)             symbol - GP + addend           */
00187 
00188 
00189 /* Data linkage table (DLT) relocation types
00190 
00191    SOM DLT_REL fixup requests are used to for static data references
00192    from position-independent code within shared libraries.  They are
00193    similar to the GOT relocation types in some SVR4 implementations.  */
00194 
00195 RELOC_NUMBER (R_PARISC_DLTREL21L,         26)
00196 /*            long immediate (7)         LR(symbol - GP, addend)        */
00197 
00198 RELOC_NUMBER (R_PARISC_DLTREL14R,         30)
00199 /*            load/store (1)             RR(symbol - GP, addend)        */
00200 
00201 RELOC_NUMBER (R_PARISC_DLTREL14F,         31)
00202 /*            load/store (1)             symbol - GP + addend           */
00203 
00204 
00205 /* DLT indirect relocation types  */
00206 RELOC_NUMBER (R_PARISC_DLTIND21L,         34)
00207 /*            long immediate (7)         L(ltoff(symbol + addend))      */
00208 
00209 RELOC_NUMBER (R_PARISC_DLTIND14R,         38)
00210 /*            load/store (1)             R(ltoff(symbol + addend))      */
00211 
00212 RELOC_NUMBER (R_PARISC_DLTIND14F,         39)
00213 /*            load/store (1)             ltoff(symbol + addend)         */
00214 
00215 
00216 /* Base relative relocation types.  Ugh.  These imply lots of state */
00217 RELOC_NUMBER (R_PARISC_SETBASE,           40)
00218 /*            none                       no reloc; base := sym          */
00219 
00220 RELOC_NUMBER (R_PARISC_SECREL32,          41)
00221 /*            32-bit word                symbol - SECT + addend         */
00222 
00223 RELOC_NUMBER (R_PARISC_BASEREL21L,        42)
00224 /*            long immediate (7)         LR(symbol - base, addend)      */
00225 
00226 RELOC_NUMBER (R_PARISC_BASEREL17R,        43)
00227 /*            branch external (19)       RR(symbol - base, addend)      */
00228 
00229 RELOC_NUMBER (R_PARISC_BASEREL17F,        44)
00230 /*            branch external (19)       symbol - base + addend         */
00231 
00232 RELOC_NUMBER (R_PARISC_BASEREL14R,        46)
00233 /*            load/store (1)             RR(symbol - base, addend)      */
00234 
00235 RELOC_NUMBER (R_PARISC_BASEREL14F,        47)
00236 /*            load/store (1)             symbol - base, addend          */
00237 
00238 
00239 /* Segment relative relocation types.  */
00240 RELOC_NUMBER (R_PARISC_SEGBASE,           48)
00241 /*            none                       no relocation; SB := sym       */
00242 
00243 RELOC_NUMBER (R_PARISC_SEGREL32,          49)
00244 /*            32-bit word                symbol - SB + addend    */
00245   
00246 
00247 /* Offsets from the PLT.  */  
00248 RELOC_NUMBER (R_PARISC_PLTOFF21L,         50)
00249 /*            long immediate (7)         LR(pltoff(symbol), addend)     */
00250 
00251 RELOC_NUMBER (R_PARISC_PLTOFF14R,         54)
00252 /*            load/store (1)             RR(pltoff(symbol), addend)     */
00253 
00254 RELOC_NUMBER (R_PARISC_PLTOFF14F,         55)
00255 /*            load/store (1)             pltoff(symbol) + addend        */
00256 
00257 
00258 RELOC_NUMBER (R_PARISC_LTOFF_FPTR32,      57)
00259 /*            32-bit word                ltoff(fptr(symbol+addend))     */
00260 
00261 RELOC_NUMBER (R_PARISC_LTOFF_FPTR21L,     58)
00262 /*            long immediate (7)         L(ltoff(fptr(symbol+addend)))  */
00263 
00264 RELOC_NUMBER (R_PARISC_LTOFF_FPTR14R,     62)
00265 /*            load/store (1)             R(ltoff(fptr(symbol+addend)))  */
00266 
00267 
00268 RELOC_NUMBER (R_PARISC_FPTR64,            64)
00269 /*            64-bit doubleword          fptr(symbol+addend)            */
00270 
00271 
00272 /* Plabel relocation types.  */     
00273 RELOC_NUMBER (R_PARISC_PLABEL32,          65)
00274 /*            32-bit word             fptr(symbol)               */
00275 
00276 RELOC_NUMBER (R_PARISC_PLABEL21L,         66)
00277 /*            long immediate (7)         L(fptr(symbol))                */
00278 
00279 RELOC_NUMBER (R_PARISC_PLABEL14R,         70)
00280 /*            load/store (1)             R(fptr(symbol))                */
00281 
00282   
00283 /* PCREL relocations.  */  
00284 RELOC_NUMBER (R_PARISC_PCREL64,           72)
00285 /*            64-bit doubleword          symbol - PC - 8 + addend       */
00286 
00287 RELOC_NUMBER (R_PARISC_PCREL22C,          73)
00288 /*            branch & link (21)         symbol - PC - 8 + addend       */
00289 
00290 RELOC_NUMBER (R_PARISC_PCREL22F,          74)
00291 /*            branch & link (21)         symbol - PC - 8 + addend       */
00292 
00293 RELOC_NUMBER (R_PARISC_PCREL14WR,         75)
00294 /*            load/store mod. comp. (2)  R(symbol - PC - 8 + addend)    */
00295 
00296 RELOC_NUMBER (R_PARISC_PCREL14DR,         76)
00297 /*            load/store doubleword (3)  R(symbol - PC - 8 + addend)    */
00298 
00299 RELOC_NUMBER (R_PARISC_PCREL16F,          77)
00300 /*            load/store (1)             symbol - PC - 8 + addend       */
00301 
00302 RELOC_NUMBER (R_PARISC_PCREL16WF,         78)
00303 /*            load/store mod. comp. (2)  symbol - PC - 8 + addend       */
00304 
00305 RELOC_NUMBER (R_PARISC_PCREL16DF,         79)
00306 /*            load/store doubleword (3)  symbol - PC - 8 + addend       */
00307 
00308 
00309 RELOC_NUMBER (R_PARISC_DIR64,             80)
00310 /*            64-bit doubleword          symbol + addend                */
00311 
00312 RELOC_NUMBER (R_PARISC_DIR14WR,           83)
00313 /*            load/store mod. comp. (2)  RR(symbol, addend)             */
00314 
00315 RELOC_NUMBER (R_PARISC_DIR14DR,           84)
00316 /*            load/store doubleword (3)  RR(symbol, addend)             */
00317 
00318 RELOC_NUMBER (R_PARISC_DIR16F,            85)
00319 /*            load/store (1)             symbol + addend                */
00320 
00321 RELOC_NUMBER (R_PARISC_DIR16WF,           86)
00322 /*            load/store mod. comp. (2)  symbol + addend                */
00323 
00324 RELOC_NUMBER (R_PARISC_DIR16DF,           87)
00325 /*            load/store doubleword (3)  symbol + addend                */
00326   
00327 RELOC_NUMBER (R_PARISC_GPREL64,           88)
00328 /*            64-bit doubleword          symbol - GP + addend    */
00329   
00330 RELOC_NUMBER (R_PARISC_DLTREL14WR,        91)
00331 /*            load/store mod. comp. (2)  RR(symbol - GP, addend)        */
00332 
00333 RELOC_NUMBER (R_PARISC_DLTREL14DR,        92)
00334 /*            load/store doubleword (3)  RR(symbol - GP, addend)        */
00335 
00336 RELOC_NUMBER (R_PARISC_GPREL16F,          93)
00337 /*            load/store (1)             symbol - GP + addend           */
00338 
00339 RELOC_NUMBER (R_PARISC_GPREL16WF,         94)
00340 /*            load/store mod. comp. (2)  symbol - GP + addend           */
00341 
00342 RELOC_NUMBER (R_PARISC_GPREL16DF,         95)
00343 /*            load/store doubleword (3)  symbol - GP + addend           */
00344 
00345 
00346 RELOC_NUMBER (R_PARISC_LTOFF64,           96)
00347 /*            64-bit doubleword          ltoff(symbol + addend)         */
00348 
00349 RELOC_NUMBER (R_PARISC_DLTIND14WR,        99)
00350 /*            load/store mod. comp. (2)  R(ltoff(symbol + addend))      */
00351 
00352 RELOC_NUMBER (R_PARISC_DLTIND14DR,     100)
00353 /*            load/store doubleword (3)  R(ltoff(symbol + addend))      */
00354 
00355 RELOC_NUMBER (R_PARISC_LTOFF16F,       101)
00356 /*            load/store (1)             ltoff(symbol + addend)         */
00357 
00358 RELOC_NUMBER (R_PARISC_LTOFF16WF,      102)
00359 /*            load/store mod. comp. (2)  ltoff(symbol + addend)         */
00360 
00361 RELOC_NUMBER (R_PARISC_LTOFF16DF,      103)
00362 /*            load/store doubleword (3)  ltoff(symbol + addend)         */
00363 
00364 
00365 RELOC_NUMBER (R_PARISC_SECREL64,       104)
00366 /*            64-bit doubleword          symbol - SECT + addend         */
00367 
00368 RELOC_NUMBER (R_PARISC_BASEREL14WR,    107)
00369 /*            load/store mod. comp. (2)  RR(symbol - base, addend)      */
00370 
00371 RELOC_NUMBER (R_PARISC_BASEREL14DR,    108)
00372 /*            load/store doubleword (3)  RR(symbol - base, addend)      */
00373 
00374 
00375 RELOC_NUMBER (R_PARISC_SEGREL64,       112)
00376 /*            64-bit doubleword          symbol - SB + addend    */
00377   
00378 RELOC_NUMBER (R_PARISC_PLTOFF14WR,     115)
00379 /*            load/store mod. comp. (2)  RR(pltoff(symbol), addend)     */
00380 
00381 RELOC_NUMBER (R_PARISC_PLTOFF14DR,     116)    
00382 /*            load/store doubleword (3)  RR(pltoff(symbol), addend)     */
00383 
00384 RELOC_NUMBER (R_PARISC_PLTOFF16F,      117)    
00385 /*            load/store (1)             pltoff(symbol) + addend        */
00386 
00387 RELOC_NUMBER (R_PARISC_PLTOFF16WF,     118)    
00388 /*            load/store mod. comp. (2)  pltoff(symbol) + addend        */
00389 
00390 RELOC_NUMBER (R_PARISC_PLTOFF16DF,     119)    
00391 /*            load/store doubleword (3)  pltoff(symbol) + addend        */
00392 
00393 
00394 RELOC_NUMBER (R_PARISC_LTOFF_FPTR64,   120)
00395 /*            64-bit doubleword          ltoff(fptr(symbol+addend))     */
00396 
00397 RELOC_NUMBER (R_PARISC_LTOFF_FPTR14WR, 123)
00398 /*            load/store mod. comp. (2)  R(ltoff(fptr(symbol+addend)))  */
00399 
00400 RELOC_NUMBER (R_PARISC_LTOFF_FPTR14DR, 124)
00401 /*            load/store doubleword (3)  R(ltoff(fptr(symbol+addend)))  */
00402 
00403 RELOC_NUMBER (R_PARISC_LTOFF_FPTR16F,  125)
00404 /*            load/store (1)             ltoff(fptr(symbol+addend))     */
00405 
00406 RELOC_NUMBER (R_PARISC_LTOFF_FPTR16WF, 126)
00407 /*            load/store mod. comp. (2)  ltoff(fptr(symbol+addend))     */
00408 
00409 RELOC_NUMBER (R_PARISC_LTOFF_FPTR16DF, 127)
00410 /*            load/store doubleword (3)  ltoff(fptr(symbol+addend))     */
00411 
00412 
00413 RELOC_NUMBER (R_PARISC_COPY,              128)
00414 /*            data                       Dynamic relocations only       */
00415 
00416 RELOC_NUMBER (R_PARISC_IPLT,              129)
00417 /*            plt                                                       */
00418 
00419 RELOC_NUMBER (R_PARISC_EPLT,              130)
00420 /*            plt                                                       */
00421 
00422 
00423 RELOC_NUMBER (R_PARISC_TPREL32,        153)
00424 /*            32-bit word                symbol - TP + addend           */
00425 
00426 RELOC_NUMBER (R_PARISC_TPREL21L,       154)
00427 /*            long immediate (7)         LR(symbol - TP, addend)        */
00428 
00429 RELOC_NUMBER (R_PARISC_TPREL14R,       158)
00430 /*            load/store (1)             RR(symbol - TP, addend)        */
00431 
00432 
00433 RELOC_NUMBER (R_PARISC_LTOFF_TP21L,    162)
00434 /*            long immediate (7)         L(ltoff(symbol - TP + addend)) */
00435 
00436 RELOC_NUMBER (R_PARISC_LTOFF_TP14R,    166)
00437 /*            load/store (1)             R(ltoff(symbol - TP + addend)) */
00438 
00439 RELOC_NUMBER (R_PARISC_LTOFF_TP14F,    167)
00440 /*            load/store (1)             ltoff(symbol - TP + addend)    */
00441 
00442 
00443 RELOC_NUMBER (R_PARISC_TPREL64,        216)
00444 /*            64-bit word                symbol - TP + addend           */
00445 
00446 RELOC_NUMBER (R_PARISC_TPREL14WR,      219)        
00447 /*            load/store mod. comp. (2)  RR(symbol - TP, addend)        */
00448 
00449 RELOC_NUMBER (R_PARISC_TPREL14DR,      220)        
00450 /*            load/store doubleword (3)  RR(symbol - TP, addend)        */
00451 
00452 RELOC_NUMBER (R_PARISC_TPREL16F,       221)        
00453 /*            load/store (1)             symbol - TP + addend           */
00454 
00455 RELOC_NUMBER (R_PARISC_TPREL16WF,      222)        
00456 /*            load/store mod. comp. (2)  symbol - TP + addend           */
00457 
00458 RELOC_NUMBER (R_PARISC_TPREL16DF,      223)        
00459 /*            load/store doubleword (3)  symbol - TP + addend           */
00460 
00461 
00462 RELOC_NUMBER (R_PARISC_LTOFF_TP64,     224)
00463 /*            64-bit doubleword          ltoff(symbol - TP + addend)    */
00464 
00465 RELOC_NUMBER (R_PARISC_LTOFF_TP14WR,   227)
00466 /*            load/store mod. comp. (2)  R(ltoff(symbol - TP + addend)) */
00467 
00468 RELOC_NUMBER (R_PARISC_LTOFF_TP14DR,   228)
00469 /*            load/store doubleword (3)  R(ltoff(symbol - TP + addend)) */
00470 
00471 RELOC_NUMBER (R_PARISC_LTOFF_TP16F,    229)
00472 /*            load/store (1)             ltoff(symbol - TP + addend)    */
00473 
00474 RELOC_NUMBER (R_PARISC_LTOFF_TP16WF,   230)
00475 /*            load/store mod. comp. (2)  ltoff(symbol - TP + addend)    */
00476 
00477 RELOC_NUMBER (R_PARISC_LTOFF_TP16DF,   231)
00478 /*            load/store doubleword (3)  ltoff(symbol - TP + addend)    */
00479 
00480 RELOC_NUMBER (R_PARISC_GNU_VTENTRY,    232)
00481 RELOC_NUMBER (R_PARISC_GNU_VTINHERIT,  233)
00482 
00483 RELOC_NUMBER (R_PARISC_TLS_GD21L,      234)
00484 RELOC_NUMBER (R_PARISC_TLS_GD14R,      235)
00485 RELOC_NUMBER (R_PARISC_TLS_GDCALL,     236)
00486 RELOC_NUMBER (R_PARISC_TLS_LDM21L,     237)
00487 RELOC_NUMBER (R_PARISC_TLS_LDM14R,     238)
00488 RELOC_NUMBER (R_PARISC_TLS_LDMCALL,    239)
00489 RELOC_NUMBER (R_PARISC_TLS_LDO21L,     240)
00490 RELOC_NUMBER (R_PARISC_TLS_LDO14R,     241)
00491 RELOC_NUMBER (R_PARISC_TLS_DTPMOD32,   242)
00492 RELOC_NUMBER (R_PARISC_TLS_DTPMOD64,   243)
00493 RELOC_NUMBER (R_PARISC_TLS_DTPOFF32,   244)
00494 RELOC_NUMBER (R_PARISC_TLS_DTPOFF64,   245)
00495 
00496 END_RELOC_NUMBERS (R_PARISC_UNIMPLEMENTED)
00497 
00498 #define R_PARISC_TLS_LE21L     R_PARISC_TPREL21L
00499 #define R_PARISC_TLS_LE14R     R_PARISC_TPREL14R
00500 #define R_PARISC_TLS_IE21L     R_PARISC_LTOFF_TP21L
00501 #define R_PARISC_TLS_IE14R     R_PARISC_LTOFF_TP14R
00502 #define R_PARISC_TLS_TPREL32   R_PARISC_TPREL32
00503 #define R_PARISC_TLS_TPREL64   R_PARISC_TPREL64
00504 
00505 #ifndef RELOC_MACROS_GEN_FUNC
00506 typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
00507 #endif
00508 
00509 #define PT_PARISC_ARCHEXT   0x70000000
00510 #define PT_PARISC_UNWIND    0x70000001
00511 #define PT_PARISC_WEAKORDER 0x70000002
00512 
00513 /* Flag bits in sh_flags of ElfXX_Shdr.  */
00514 #define SHF_HP_TLS              0x01000000
00515 #define SHF_HP_NEAR_SHARED      0x02000000
00516 #define SHF_HP_FAR_SHARED       0x04000000
00517 #define SHF_HP_COMDAT           0x08000000
00518 #define SHF_HP_CONST            0x00800000
00519 
00520 /* Reserved section header indices.  */
00521 #define SHN_TLS_COMMON          (SHN_LOOS + 0x0)
00522 #define SHN_NS_COMMON           (SHN_LOOS + 0x1)
00523 #define SHN_FS_COMMON           (SHN_LOOS + 0x2)
00524 #define SHN_NS_UNDEF            (SHN_LOOS + 0x3)
00525 #define SHN_FS_UNDEF            (SHN_LOOS + 0x4)
00526 #define SHN_HP_EXTERN           (SHN_LOOS + 0x5)
00527 #define SHN_HP_EXTHINT          (SHN_LOOS + 0x6)
00528 #define SHN_HP_UNDEF_BIND_IMM   (SHN_LOOS + 0x7)
00529 
00530 /* Values of sh_type in ElfXX_Shdr.  */
00531 #define SHT_HP_OVLBITS  (SHT_LOOS + 0x0)
00532 #define SHT_HP_DLKM     (SHT_LOOS + 0x1)
00533 #define SHT_HP_COMDAT   (SHT_LOOS + 0x2)
00534 #define SHT_HP_OBJDICT  (SHT_LOOS + 0x3)
00535 #define SHT_HP_ANNOT    (SHT_LOOS + 0x4)
00536 
00537 /* Flag bits in p_flags of ElfXX_Phdr.  */
00538 #define PF_HP_CODE          0x00040000
00539 #define PF_HP_MODIFY        0x00080000
00540 #define PF_HP_PAGE_SIZE            0x00100000
00541 #define PF_HP_FAR_SHARED    0x00200000
00542 #define PF_HP_NEAR_SHARED   0x00400000
00543 #define PF_HP_LAZYSWAP             0x00800000
00544 #define PF_HP_CODE_DEPR            0x01000000
00545 #define PF_HP_MODIFY_DEPR   0x02000000
00546 #define PF_HP_LAZYSWAP_DEPR 0x04000000
00547 #define PF_PARISC_SBP              0x08000000
00548 #define PF_HP_SBP           0x08000000
00549 
00550 
00551 /* Processor specific dynamic array tags.  */
00552 
00553 /* Arggh.  HP's tools define these symbols based on the
00554    old value of DT_LOOS.  So we must do the same to be
00555    compatible.  */
00556 #define DT_HP_LOAD_MAP             (OLD_DT_LOOS + 0x0)
00557 #define DT_HP_DLD_FLAGS            (OLD_DT_LOOS + 0x1)
00558 #define DT_HP_DLD_HOOK             (OLD_DT_LOOS + 0x2)
00559 #define DT_HP_UX10_INIT            (OLD_DT_LOOS + 0x3)
00560 #define DT_HP_UX10_INITSZ   (OLD_DT_LOOS + 0x4)
00561 #define DT_HP_PREINIT              (OLD_DT_LOOS + 0x5)
00562 #define DT_HP_PREINITSZ            (OLD_DT_LOOS + 0x6)
00563 #define DT_HP_NEEDED        (OLD_DT_LOOS + 0x7)
00564 #define DT_HP_TIME_STAMP    (OLD_DT_LOOS + 0x8)
00565 #define DT_HP_CHECKSUM             (OLD_DT_LOOS + 0x9)
00566 #define DT_HP_GST_SIZE             (OLD_DT_LOOS + 0xa)
00567 #define DT_HP_GST_VERSION   (OLD_DT_LOOS + 0xb)
00568 #define DT_HP_GST_HASHVAL   (OLD_DT_LOOS + 0xc)
00569 #define DT_HP_EPLTREL              (OLD_DT_LOOS + 0xd)
00570 #define DT_HP_EPLTRELSZ            (OLD_DT_LOOS + 0xe)
00571 #define DT_HP_FILTERED             (OLD_DT_LOOS + 0xf)
00572 #define DT_HP_FILTER_TLS    (OLD_DT_LOOS + 0x10)
00573 #define DT_HP_COMPAT_FILTERED      (OLD_DT_LOOS + 0x11)
00574 #define DT_HP_LAZYLOAD             (OLD_DT_LOOS + 0x12)
00575 #define DT_HP_BIND_NOW_COUNT       (OLD_DT_LOOS + 0x13)
00576 #define DT_PLT                     (OLD_DT_LOOS + 0x14)
00577 #define DT_PLT_SIZE         (OLD_DT_LOOS + 0x15)
00578 #define DT_DLT                     (OLD_DT_LOOS + 0x16)
00579 #define DT_DLT_SIZE         (OLD_DT_LOOS + 0x17)
00580 
00581 /* Values for DT_HP_DLD_FLAGS.  */
00582 #define DT_HP_DEBUG_PRIVATE        0x00001 /* Map text private */
00583 #define DT_HP_DEBUG_CALLBACK              0x00002 /* Callback */
00584 #define DT_HP_DEBUG_CALLBACK_BOR   0x00004 /* BOR callback */
00585 #define DT_HP_NO_ENVVAR                   0x00008 /* No env var */
00586 #define DT_HP_BIND_NOW                    0x00010 /* Bind now */
00587 #define DT_HP_BIND_NONFATAL        0x00020 /* Bind non-fatal */
00588 #define DT_HP_BIND_VERBOSE         0x00040 /* Bind verbose */
00589 #define DT_HP_BIND_RESTRICTED             0x00080 /* Bind restricted */
00590 #define DT_HP_BIND_SYMBOLIC        0x00100 /* Bind symbolic */
00591 #define DT_HP_RPATH_FIRST          0x00200 /* RPATH first */
00592 #define DT_HP_BIND_DEPTH_FIRST            0x00400 /* Bind depth-first */
00593 #define DT_HP_GST                  0x00800 /* Dld global sym table */
00594 #define DT_HP_SHLIB_FIXED          0x01000 /* shared vtable support */
00595 #define DT_HP_MERGE_SHLIB_SEG             0x02000 /* merge shlib data segs */
00596 #define DT_HP_NODELETE                    0x04000 /* never unload */
00597 #define DT_HP_GROUP                0x08000 /* bind only within group */
00598 #define DT_HP_PROTECT_LINKAGE_TABLE       0x10000 /* protected linkage table */
00599 
00600 /* Program header extensions.  */
00601 #define PT_HP_TLS           (PT_LOOS + 0x0)
00602 #define PT_HP_CORE_NONE            (PT_LOOS + 0x1)
00603 #define PT_HP_CORE_VERSION  (PT_LOOS + 0x2)
00604 #define PT_HP_CORE_KERNEL   (PT_LOOS + 0x3)
00605 #define PT_HP_CORE_COMM            (PT_LOOS + 0x4)
00606 #define PT_HP_CORE_PROC            (PT_LOOS + 0x5)
00607 #define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
00608 #define PT_HP_CORE_STACK    (PT_LOOS + 0x7)
00609 #define PT_HP_CORE_SHM             (PT_LOOS + 0x8)
00610 #define PT_HP_CORE_MMF             (PT_LOOS + 0x9)
00611 #define PT_HP_PARALLEL             (PT_LOOS + 0x10)
00612 #define PT_HP_FASTBIND             (PT_LOOS + 0x11)
00613 #define PT_HP_OPT_ANNOT            (PT_LOOS + 0x12)
00614 #define PT_HP_HSL_ANNOT            (PT_LOOS + 0x13)
00615 #define PT_HP_STACK         (PT_LOOS + 0x14)
00616 #define PT_HP_CORE_UTSNAME  (PT_LOOS + 0x15)
00617 
00618 /* Binding information.  */
00619 #define STB_HP_ALIAS        (STB_LOOS + 0x0)
00620 
00621 /* Additional symbol types.  */
00622 #define STT_HP_OPAQUE              (STT_LOOS + 0x1)
00623 #define STT_HP_STUB         (STT_LOOS + 0x2)
00624 
00625 /* Note types.  */
00626 #define NT_HP_COMPILER             1
00627 #define NT_HP_COPYRIGHT            2
00628 #define NT_HP_VERSION              3
00629 #define NT_HP_SRCFILE_INFO  4
00630 #define NT_HP_LINKER        5
00631 #define NT_HP_INSTRUMENTED  6
00632 #define NT_HP_UX_OPTIONS    7
00633 
00634 #endif /* _ELF_HPPA_H */