189857Sobrien/* 390 ELF support for BFD. 2218822Sdim Copyright 2000, 2001, 2003 Free Software Foundation, Inc. 389857Sobrien Contributed by Carl B. Pedersen and Martin Schwidefsky. 489857Sobrien 589857Sobrien This file is part of BFD, the Binary File Descriptor library. 689857Sobrien 789857Sobrien This program is free software; you can redistribute it and/or modify 889857Sobrien it under the terms of the GNU General Public License as published by 989857Sobrien the Free Software Foundation; either version 2 of the License, or 1089857Sobrien (at your option) any later version. 1189857Sobrien 1289857Sobrien This program is distributed in the hope that it will be useful, 1389857Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1489857Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1589857Sobrien GNU General Public License for more details. 1689857Sobrien 1789857Sobrien You should have received a copy of the GNU General Public License 1889857Sobrien along with this program; if not, write to the Free Software 19218822Sdim Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 20218822Sdim 02110-1301, USA. */ 2189857Sobrien 2289857Sobrien#ifndef _ELF_390_H 2389857Sobrien#define _ELF_390_H 2489857Sobrien 2589857Sobrien/* Processor specific flags for the ELF header e_flags field. */ 2689857Sobrien 2789857Sobrien/* Symbol types. */ 2889857Sobrien 2989857Sobrien#define STACK_REG 15 /* Global Stack reg */ 3089857Sobrien#define BACKL_REG 14 /* Global Backlink reg */ 3189857Sobrien#define BASE_REG 13 /* Global Base reg */ 3289857Sobrien#define GOT_REG 12 /* Holds addr of GOT */ 3389857Sobrien 3489857Sobrien#include "elf/reloc-macros.h" 3589857Sobrien 3689857Sobrien/* Relocation types. */ 3789857Sobrien 3889857SobrienSTART_RELOC_NUMBERS (elf_s390_reloc_type) 3989857Sobrien RELOC_NUMBER (R_390_NONE, 0) /* No reloc. */ 4089857Sobrien RELOC_NUMBER (R_390_8, 1) /* Direct 8 bit. */ 4189857Sobrien RELOC_NUMBER (R_390_12, 2) /* Direct 12 bit. */ 4289857Sobrien RELOC_NUMBER (R_390_16, 3) /* Direct 16 bit. */ 4389857Sobrien RELOC_NUMBER (R_390_32, 4) /* Direct 32 bit. */ 4489857Sobrien RELOC_NUMBER (R_390_PC32, 5) /* PC relative 32 bit. */ 4589857Sobrien RELOC_NUMBER (R_390_GOT12, 6) /* 12 bit GOT offset. */ 4689857Sobrien RELOC_NUMBER (R_390_GOT32, 7) /* 32 bit GOT offset. */ 4789857Sobrien RELOC_NUMBER (R_390_PLT32, 8) /* 32 bit PC relative PLT address. */ 4889857Sobrien RELOC_NUMBER (R_390_COPY, 9) /* Copy symbol at runtime. */ 4989857Sobrien RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */ 5089857Sobrien RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */ 5189857Sobrien RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */ 52130561Sobrien RELOC_NUMBER (R_390_GOTOFF32, 13) /* 32 bit offset to GOT. */ 5389857Sobrien RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */ 5489857Sobrien RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */ 5589857Sobrien RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */ 5689857Sobrien RELOC_NUMBER (R_390_PC16DBL, 17) /* PC relative 16 bit shifted by 1. */ 5789857Sobrien RELOC_NUMBER (R_390_PLT16DBL, 18) /* 16 bit PC rel. PLT shifted by 1. */ 5889857Sobrien RELOC_NUMBER (R_390_PC32DBL, 19) /* PC relative 32 bit shifted by 1. */ 5989857Sobrien RELOC_NUMBER (R_390_PLT32DBL, 20) /* 32 bit PC rel. PLT shifted by 1. */ 6089857Sobrien RELOC_NUMBER (R_390_GOTPCDBL, 21) /* 32 bit PC rel. GOT shifted by 1. */ 6189857Sobrien RELOC_NUMBER (R_390_64, 22) /* Direct 64 bit. */ 6289857Sobrien RELOC_NUMBER (R_390_PC64, 23) /* PC relative 64 bit. */ 6389857Sobrien RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */ 6489857Sobrien RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */ 6589857Sobrien RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */ 66130561Sobrien RELOC_NUMBER (R_390_GOTOFF16, 27) /* 16 bit offset to GOT. */ 67130561Sobrien RELOC_NUMBER (R_390_GOTOFF64, 28) /* 64 bit offset to GOT. */ 68130561Sobrien RELOC_NUMBER (R_390_GOTPLT12, 29) /* 12 bit offset to jump slot. */ 69130561Sobrien RELOC_NUMBER (R_390_GOTPLT16, 30) /* 16 bit offset to jump slot. */ 70130561Sobrien RELOC_NUMBER (R_390_GOTPLT32, 31) /* 32 bit offset to jump slot. */ 71130561Sobrien RELOC_NUMBER (R_390_GOTPLT64, 32) /* 64 bit offset to jump slot. */ 72130561Sobrien RELOC_NUMBER (R_390_GOTPLTENT, 33) /* 32 bit rel. offset to jump slot. */ 73130561Sobrien RELOC_NUMBER (R_390_PLTOFF16, 34) /* 16 bit offset from GOT to PLT. */ 74130561Sobrien RELOC_NUMBER (R_390_PLTOFF32, 35) /* 32 bit offset from GOT to PLT. */ 75130561Sobrien RELOC_NUMBER (R_390_PLTOFF64, 36) /* 16 bit offset from GOT to PLT. */ 76130561Sobrien RELOC_NUMBER (R_390_TLS_LOAD, 37) /* Tag for load insn in TLS code. */ 77130561Sobrien RELOC_NUMBER (R_390_TLS_GDCALL, 38) /* Tag for function call in general 78130561Sobrien dynamic TLS code. */ 79130561Sobrien RELOC_NUMBER (R_390_TLS_LDCALL, 39) /* Tag for function call in local 80130561Sobrien dynamic TLS code. */ 81130561Sobrien RELOC_NUMBER (R_390_TLS_GD32, 40) /* Direct 32 bit for general dynamic 82130561Sobrien thread local data. */ 83130561Sobrien RELOC_NUMBER (R_390_TLS_GD64, 41) /* Direct 64 bit for general dynamic 84130561Sobrien thread local data. */ 85130561Sobrien RELOC_NUMBER (R_390_TLS_GOTIE12, 42)/* 12 bit GOT offset for static TLS 86130561Sobrien block offset. */ 87130561Sobrien RELOC_NUMBER (R_390_TLS_GOTIE32, 43)/* 32 bit GOT offset for static TLS 88130561Sobrien block offset. */ 89130561Sobrien RELOC_NUMBER (R_390_TLS_GOTIE64, 44)/* 64 bit GOT offset for static TLS 90130561Sobrien block offset. */ 91130561Sobrien RELOC_NUMBER (R_390_TLS_LDM32, 45) /* Direct 32 bit for local dynamic 92130561Sobrien thread local data in LD code. */ 93130561Sobrien RELOC_NUMBER (R_390_TLS_LDM64, 46) /* Direct 64 bit for local dynamic 94130561Sobrien thread local data in LD code. */ 95130561Sobrien RELOC_NUMBER (R_390_TLS_IE32, 47) /* 32 bit address of GOT entry for 96130561Sobrien negated static TLS block offset. */ 97130561Sobrien RELOC_NUMBER (R_390_TLS_IE64, 48) /* 64 bit address of GOT entry for 98130561Sobrien negated static TLS block offset. */ 99130561Sobrien RELOC_NUMBER (R_390_TLS_IEENT, 49) /* 32 bit rel. offset to GOT entry for 100130561Sobrien negated static TLS block offset. */ 101130561Sobrien RELOC_NUMBER (R_390_TLS_LE32, 50) /* 32 bit negated offset relative to 102130561Sobrien static TLS block. */ 103130561Sobrien RELOC_NUMBER (R_390_TLS_LE64, 51) /* 64 bit negated offset relative to 104130561Sobrien static TLS block. */ 105130561Sobrien RELOC_NUMBER (R_390_TLS_LDO32, 52) /* 32 bit offset relative to TLS 106130561Sobrien block. */ 107130561Sobrien RELOC_NUMBER (R_390_TLS_LDO64, 53) /* 64 bit offset relative to TLS 108130561Sobrien block. */ 109130561Sobrien RELOC_NUMBER (R_390_TLS_DTPMOD, 54) /* ID of module containing symbol. */ 110130561Sobrien RELOC_NUMBER (R_390_TLS_DTPOFF, 55) /* Offset in TLS block. */ 111130561Sobrien RELOC_NUMBER (R_390_TLS_TPOFF, 56) /* Negate offset in static TLS 112130561Sobrien block. */ 113130561Sobrien RELOC_NUMBER (R_390_20, 57) /* Direct 20 bit. */ 114130561Sobrien RELOC_NUMBER (R_390_GOT20, 58) /* 20 bit GOT offset. */ 115130561Sobrien RELOC_NUMBER (R_390_GOTPLT20, 59) /* 20 bit offset to jump slot. */ 116130561Sobrien RELOC_NUMBER (R_390_TLS_GOTIE20, 60)/* 20 bit GOT offset for statis TLS 117130561Sobrien block offset. */ 11889857Sobrien /* These are GNU extensions to enable C++ vtable garbage collection. */ 11989857Sobrien RELOC_NUMBER (R_390_GNU_VTINHERIT, 250) 12089857Sobrien RELOC_NUMBER (R_390_GNU_VTENTRY, 251) 12189857SobrienEND_RELOC_NUMBERS (R_390_max) 12289857Sobrien 12389857Sobrien#endif /* _ELF_390_H */ 12489857Sobrien 12589857Sobrien 126