xref: /netbsd-src/external/gpl3/binutils/dist/elfcpp/s390.h (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
19573673dSchristos // s390.h -- ELF definitions specific to EM_S390  -*- C++ -*-
29573673dSchristos 
3*cb63e24eSchristos // Copyright (C) 2015-2024 Free Software Foundation, Inc.
49573673dSchristos // Written by Marcin Kościelnicki <koriakin@0x04.net>.
59573673dSchristos 
69573673dSchristos // This file is part of elfcpp.
79573673dSchristos 
89573673dSchristos // This program is free software; you can redistribute it and/or
99573673dSchristos // modify it under the terms of the GNU Library General Public License
109573673dSchristos // as published by the Free Software Foundation; either version 2, or
119573673dSchristos // (at your option) any later version.
129573673dSchristos 
139573673dSchristos // In addition to the permissions in the GNU Library General Public
149573673dSchristos // License, the Free Software Foundation gives you unlimited
159573673dSchristos // permission to link the compiled version of this file into
169573673dSchristos // combinations with other programs, and to distribute those
179573673dSchristos // combinations without any restriction coming from the use of this
189573673dSchristos // file.  (The Library Public License restrictions do apply in other
199573673dSchristos // respects; for example, they cover modification of the file, and
209573673dSchristos /// distribution when not linked into a combined executable.)
219573673dSchristos 
229573673dSchristos // This program is distributed in the hope that it will be useful, but
239573673dSchristos // WITHOUT ANY WARRANTY; without even the implied warranty of
249573673dSchristos // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
259573673dSchristos // Library General Public License for more details.
269573673dSchristos 
279573673dSchristos // You should have received a copy of the GNU Library General Public
289573673dSchristos // License along with this program; if not, write to the Free Software
299573673dSchristos // Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
309573673dSchristos // 02110-1301, USA.
319573673dSchristos 
329573673dSchristos #ifndef ELFCPP_S390_H
339573673dSchristos #define ELFCPP_S390_H
349573673dSchristos 
359573673dSchristos namespace elfcpp
369573673dSchristos {
379573673dSchristos 
389573673dSchristos enum
399573673dSchristos {
409573673dSchristos   // Original 31-bit ABI.
419573673dSchristos   R_390_NONE = 0,           // No reloc.
429573673dSchristos   R_390_8 = 1,              // Direct 8 bit.
439573673dSchristos   R_390_12 = 2,             // Direct 12 bit.
449573673dSchristos   R_390_16 = 3,             // Direct 16 bit.
459573673dSchristos   R_390_32 = 4,             // Direct 32 bit.
469573673dSchristos   R_390_PC32 = 5,           // PC relative 32 bit.
479573673dSchristos   R_390_GOT12 = 6,          // 12 bit GOT offset.
489573673dSchristos   R_390_GOT32 = 7,          // 32 bit GOT offset.
499573673dSchristos   R_390_PLT32 = 8,          // 32 bit PC relative PLT address.
509573673dSchristos   R_390_COPY = 9,           // Copy symbol at runtime.
519573673dSchristos   R_390_GLOB_DAT = 10,      // Create GOT entry.
529573673dSchristos   R_390_JMP_SLOT = 11,      // Create PLT entry.
539573673dSchristos   R_390_RELATIVE = 12,      // Adjust by program base.
549573673dSchristos   R_390_GOTOFF32 = 13,      // 32 bit offset to GOT.
559573673dSchristos   R_390_GOTPC = 14,         // 32 bit PC relative offset to GOT.
569573673dSchristos   R_390_GOT16 = 15,         // 16 bit GOT offset.
579573673dSchristos   R_390_PC16 = 16,          // PC relative 16 bit.
589573673dSchristos   R_390_PC16DBL = 17,       // PC relative 16 bit shifted by 1.
599573673dSchristos   R_390_PLT16DBL = 18,      // 16 bit PC rel. PLT shifted by 1.
609573673dSchristos   // New 64-bit ABI.
619573673dSchristos   R_390_PC32DBL = 19,       // PC relative 32 bit shifted by 1.
629573673dSchristos   R_390_PLT32DBL = 20,      // 32 bit PC rel. PLT shifted by 1.
639573673dSchristos   R_390_GOTPCDBL = 21,      // 32 bit PC rel. GOT shifted by 1.
649573673dSchristos   R_390_64 = 22,            // Direct 64 bit.
659573673dSchristos   R_390_PC64 = 23,          // PC relative 64 bit.
669573673dSchristos   R_390_GOT64 = 24,         // 64 bit GOT offset.
679573673dSchristos   R_390_PLT64 = 25,         // 64 bit PC relative PLT address.
689573673dSchristos   R_390_GOTENT = 26,        // 32 bit PC rel. to GOT entry >> 1.
699573673dSchristos   // Extensions.
709573673dSchristos   R_390_GOTOFF16 = 27,      // 16 bit offset to GOT.
719573673dSchristos   R_390_GOTOFF64 = 28,      // 64 bit offset to GOT.
729573673dSchristos   R_390_GOTPLT12 = 29,      // 12 bit offset to jump slot.
739573673dSchristos   R_390_GOTPLT16 = 30,      // 16 bit offset to jump slot.
749573673dSchristos   R_390_GOTPLT32 = 31,      // 32 bit offset to jump slot.
759573673dSchristos   R_390_GOTPLT64 = 32,      // 64 bit offset to jump slot.
769573673dSchristos   R_390_GOTPLTENT = 33,     // 32 bit rel. offset to jump slot.
779573673dSchristos   R_390_PLTOFF16 = 34,      // 16 bit offset from GOT to PLT.
789573673dSchristos   R_390_PLTOFF32 = 35,      // 32 bit offset from GOT to PLT.
799573673dSchristos   R_390_PLTOFF64 = 36,      // 16 bit offset from GOT to PLT.
809573673dSchristos   // TLS extensions.
819573673dSchristos   R_390_TLS_LOAD = 37,      // Tag for load insn in TLS code.
829573673dSchristos   R_390_TLS_GDCALL = 38,    // Tag for function call in general dynamic TLS code.
839573673dSchristos   R_390_TLS_LDCALL = 39,    // Tag for function call in local dynamic TLS code.
849573673dSchristos   R_390_TLS_GD32 = 40,      // Direct 32 bit for general dynamic thread local data.
859573673dSchristos   R_390_TLS_GD64 = 41,      // Direct 64 bit for general dynamic thread local data.
869573673dSchristos   R_390_TLS_GOTIE12 = 42,   // 12 bit GOT offset for static TLS block offset.
879573673dSchristos   R_390_TLS_GOTIE32 = 43,   // 32 bit GOT offset for static TLS block offset.
889573673dSchristos   R_390_TLS_GOTIE64 = 44,   // 64 bit GOT offset for static TLS block offset.
899573673dSchristos   R_390_TLS_LDM32 = 45,     // Direct 32 bit for local dynamic thread local data in LD code.
909573673dSchristos   R_390_TLS_LDM64 = 46,     // Direct 64 bit for local dynamic thread local data in LD code.
919573673dSchristos   R_390_TLS_IE32 = 47,      // 32 bit address of GOT entry for negated static TLS block offset.
929573673dSchristos   R_390_TLS_IE64 = 48,      // 64 bit address of GOT entry for negated static TLS block offset.
939573673dSchristos   R_390_TLS_IEENT = 49,     // 32 bit rel. offset to GOT entry for negated static TLS block offset.
949573673dSchristos   R_390_TLS_LE32 = 50,      // 32 bit negated offset relative to static TLS block.
959573673dSchristos   R_390_TLS_LE64 = 51,      // 64 bit negated offset relative to static TLS block.
969573673dSchristos   R_390_TLS_LDO32 = 52,     // 32 bit offset relative to TLS block.
979573673dSchristos   R_390_TLS_LDO64 = 53,     // 64 bit offset relative to TLS block.
989573673dSchristos   R_390_TLS_DTPMOD = 54,    // ID of module containing symbol.
999573673dSchristos   R_390_TLS_DTPOFF = 55,    // Offset in TLS block.
1009573673dSchristos   R_390_TLS_TPOFF = 56,     // Negate offset in static TLS block.
1019573673dSchristos   // Yet more misc extensions.
1029573673dSchristos   R_390_20 = 57,            // Direct 20 bit.
1039573673dSchristos   R_390_GOT20 = 58,         // 20 bit GOT offset.
1049573673dSchristos   R_390_GOTPLT20 = 59,      // 20 bit offset to jump slot.
1059573673dSchristos   R_390_TLS_GOTIE20 = 60,   // 20 bit GOT offset for static TLS block offset.
1069573673dSchristos   R_390_IRELATIVE = 61,     // IFUNC relocation.
1079573673dSchristos   R_390_PC12DBL = 62,       // PC relative 12 bit shifted by 1.
1089573673dSchristos   R_390_PLT12DBL = 63,      // 12 bit PC rel. PLT shifted by 1.
1099573673dSchristos   R_390_PC24DBL = 64,       // PC relative 24 bit shifted by 1.
1109573673dSchristos   R_390_PLT24DBL = 65,      // 24 bit PC rel. PLT shifted by 1.
1119573673dSchristos   // GNU vtable garbage collection extensions.
1129573673dSchristos   R_390_GNU_VTINHERIT = 250,
1139573673dSchristos   R_390_GNU_VTENTRY = 251,
1149573673dSchristos };
1159573673dSchristos 
1169573673dSchristos } // End namespace elfcpp.
1179573673dSchristos 
1189573673dSchristos #endif // !defined(ELFCPP_S390_H)
119