175fd0b74Schristos // s390.h -- ELF definitions specific to EM_S390 -*- C++ -*- 275fd0b74Schristos 3*e992f068Schristos // Copyright (C) 2015-2022 Free Software Foundation, Inc. 475fd0b74Schristos // Written by Marcin Kościelnicki <koriakin@0x04.net>. 575fd0b74Schristos 675fd0b74Schristos // This file is part of elfcpp. 775fd0b74Schristos 875fd0b74Schristos // This program is free software; you can redistribute it and/or 975fd0b74Schristos // modify it under the terms of the GNU Library General Public License 1075fd0b74Schristos // as published by the Free Software Foundation; either version 2, or 1175fd0b74Schristos // (at your option) any later version. 1275fd0b74Schristos 1375fd0b74Schristos // In addition to the permissions in the GNU Library General Public 1475fd0b74Schristos // License, the Free Software Foundation gives you unlimited 1575fd0b74Schristos // permission to link the compiled version of this file into 1675fd0b74Schristos // combinations with other programs, and to distribute those 1775fd0b74Schristos // combinations without any restriction coming from the use of this 1875fd0b74Schristos // file. (The Library Public License restrictions do apply in other 1975fd0b74Schristos // respects; for example, they cover modification of the file, and 2075fd0b74Schristos /// distribution when not linked into a combined executable.) 2175fd0b74Schristos 2275fd0b74Schristos // This program is distributed in the hope that it will be useful, but 2375fd0b74Schristos // WITHOUT ANY WARRANTY; without even the implied warranty of 2475fd0b74Schristos // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2575fd0b74Schristos // Library General Public License for more details. 2675fd0b74Schristos 2775fd0b74Schristos // You should have received a copy of the GNU Library General Public 2875fd0b74Schristos // License along with this program; if not, write to the Free Software 2975fd0b74Schristos // Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 3075fd0b74Schristos // 02110-1301, USA. 3175fd0b74Schristos 3275fd0b74Schristos #ifndef ELFCPP_S390_H 3375fd0b74Schristos #define ELFCPP_S390_H 3475fd0b74Schristos 3575fd0b74Schristos namespace elfcpp 3675fd0b74Schristos { 3775fd0b74Schristos 3875fd0b74Schristos enum 3975fd0b74Schristos { 4075fd0b74Schristos // Original 31-bit ABI. 4175fd0b74Schristos R_390_NONE = 0, // No reloc. 4275fd0b74Schristos R_390_8 = 1, // Direct 8 bit. 4375fd0b74Schristos R_390_12 = 2, // Direct 12 bit. 4475fd0b74Schristos R_390_16 = 3, // Direct 16 bit. 4575fd0b74Schristos R_390_32 = 4, // Direct 32 bit. 4675fd0b74Schristos R_390_PC32 = 5, // PC relative 32 bit. 4775fd0b74Schristos R_390_GOT12 = 6, // 12 bit GOT offset. 4875fd0b74Schristos R_390_GOT32 = 7, // 32 bit GOT offset. 4975fd0b74Schristos R_390_PLT32 = 8, // 32 bit PC relative PLT address. 5075fd0b74Schristos R_390_COPY = 9, // Copy symbol at runtime. 5175fd0b74Schristos R_390_GLOB_DAT = 10, // Create GOT entry. 5275fd0b74Schristos R_390_JMP_SLOT = 11, // Create PLT entry. 5375fd0b74Schristos R_390_RELATIVE = 12, // Adjust by program base. 5475fd0b74Schristos R_390_GOTOFF32 = 13, // 32 bit offset to GOT. 5575fd0b74Schristos R_390_GOTPC = 14, // 32 bit PC relative offset to GOT. 5675fd0b74Schristos R_390_GOT16 = 15, // 16 bit GOT offset. 5775fd0b74Schristos R_390_PC16 = 16, // PC relative 16 bit. 5875fd0b74Schristos R_390_PC16DBL = 17, // PC relative 16 bit shifted by 1. 5975fd0b74Schristos R_390_PLT16DBL = 18, // 16 bit PC rel. PLT shifted by 1. 6075fd0b74Schristos // New 64-bit ABI. 6175fd0b74Schristos R_390_PC32DBL = 19, // PC relative 32 bit shifted by 1. 6275fd0b74Schristos R_390_PLT32DBL = 20, // 32 bit PC rel. PLT shifted by 1. 6375fd0b74Schristos R_390_GOTPCDBL = 21, // 32 bit PC rel. GOT shifted by 1. 6475fd0b74Schristos R_390_64 = 22, // Direct 64 bit. 6575fd0b74Schristos R_390_PC64 = 23, // PC relative 64 bit. 6675fd0b74Schristos R_390_GOT64 = 24, // 64 bit GOT offset. 6775fd0b74Schristos R_390_PLT64 = 25, // 64 bit PC relative PLT address. 6875fd0b74Schristos R_390_GOTENT = 26, // 32 bit PC rel. to GOT entry >> 1. 6975fd0b74Schristos // Extensions. 7075fd0b74Schristos R_390_GOTOFF16 = 27, // 16 bit offset to GOT. 7175fd0b74Schristos R_390_GOTOFF64 = 28, // 64 bit offset to GOT. 7275fd0b74Schristos R_390_GOTPLT12 = 29, // 12 bit offset to jump slot. 7375fd0b74Schristos R_390_GOTPLT16 = 30, // 16 bit offset to jump slot. 7475fd0b74Schristos R_390_GOTPLT32 = 31, // 32 bit offset to jump slot. 7575fd0b74Schristos R_390_GOTPLT64 = 32, // 64 bit offset to jump slot. 7675fd0b74Schristos R_390_GOTPLTENT = 33, // 32 bit rel. offset to jump slot. 7775fd0b74Schristos R_390_PLTOFF16 = 34, // 16 bit offset from GOT to PLT. 7875fd0b74Schristos R_390_PLTOFF32 = 35, // 32 bit offset from GOT to PLT. 7975fd0b74Schristos R_390_PLTOFF64 = 36, // 16 bit offset from GOT to PLT. 8075fd0b74Schristos // TLS extensions. 8175fd0b74Schristos R_390_TLS_LOAD = 37, // Tag for load insn in TLS code. 8275fd0b74Schristos R_390_TLS_GDCALL = 38, // Tag for function call in general dynamic TLS code. 8375fd0b74Schristos R_390_TLS_LDCALL = 39, // Tag for function call in local dynamic TLS code. 8475fd0b74Schristos R_390_TLS_GD32 = 40, // Direct 32 bit for general dynamic thread local data. 8575fd0b74Schristos R_390_TLS_GD64 = 41, // Direct 64 bit for general dynamic thread local data. 8675fd0b74Schristos R_390_TLS_GOTIE12 = 42, // 12 bit GOT offset for static TLS block offset. 8775fd0b74Schristos R_390_TLS_GOTIE32 = 43, // 32 bit GOT offset for static TLS block offset. 8875fd0b74Schristos R_390_TLS_GOTIE64 = 44, // 64 bit GOT offset for static TLS block offset. 8975fd0b74Schristos R_390_TLS_LDM32 = 45, // Direct 32 bit for local dynamic thread local data in LD code. 9075fd0b74Schristos R_390_TLS_LDM64 = 46, // Direct 64 bit for local dynamic thread local data in LD code. 9175fd0b74Schristos R_390_TLS_IE32 = 47, // 32 bit address of GOT entry for negated static TLS block offset. 9275fd0b74Schristos R_390_TLS_IE64 = 48, // 64 bit address of GOT entry for negated static TLS block offset. 9375fd0b74Schristos R_390_TLS_IEENT = 49, // 32 bit rel. offset to GOT entry for negated static TLS block offset. 9475fd0b74Schristos R_390_TLS_LE32 = 50, // 32 bit negated offset relative to static TLS block. 9575fd0b74Schristos R_390_TLS_LE64 = 51, // 64 bit negated offset relative to static TLS block. 9675fd0b74Schristos R_390_TLS_LDO32 = 52, // 32 bit offset relative to TLS block. 9775fd0b74Schristos R_390_TLS_LDO64 = 53, // 64 bit offset relative to TLS block. 9875fd0b74Schristos R_390_TLS_DTPMOD = 54, // ID of module containing symbol. 9975fd0b74Schristos R_390_TLS_DTPOFF = 55, // Offset in TLS block. 10075fd0b74Schristos R_390_TLS_TPOFF = 56, // Negate offset in static TLS block. 10175fd0b74Schristos // Yet more misc extensions. 10275fd0b74Schristos R_390_20 = 57, // Direct 20 bit. 10375fd0b74Schristos R_390_GOT20 = 58, // 20 bit GOT offset. 10475fd0b74Schristos R_390_GOTPLT20 = 59, // 20 bit offset to jump slot. 10575fd0b74Schristos R_390_TLS_GOTIE20 = 60, // 20 bit GOT offset for static TLS block offset. 10675fd0b74Schristos R_390_IRELATIVE = 61, // IFUNC relocation. 10775fd0b74Schristos R_390_PC12DBL = 62, // PC relative 12 bit shifted by 1. 10875fd0b74Schristos R_390_PLT12DBL = 63, // 12 bit PC rel. PLT shifted by 1. 10975fd0b74Schristos R_390_PC24DBL = 64, // PC relative 24 bit shifted by 1. 11075fd0b74Schristos R_390_PLT24DBL = 65, // 24 bit PC rel. PLT shifted by 1. 11175fd0b74Schristos // GNU vtable garbage collection extensions. 11275fd0b74Schristos R_390_GNU_VTINHERIT = 250, 11375fd0b74Schristos R_390_GNU_VTENTRY = 251, 11475fd0b74Schristos }; 11575fd0b74Schristos 11675fd0b74Schristos } // End namespace elfcpp. 11775fd0b74Schristos 11875fd0b74Schristos #endif // !defined(ELFCPP_S390_H) 119