s390.h revision 218822
10SN/A/* 390 ELF support for BFD.
29330SN/A   Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
30SN/A   Contributed by Carl B. Pedersen and Martin Schwidefsky.
40SN/A
50SN/A   This file is part of BFD, the Binary File Descriptor library.
60SN/A
72362SN/A   This program is free software; you can redistribute it and/or modify
80SN/A   it under the terms of the GNU General Public License as published by
92362SN/A   the Free Software Foundation; either version 2 of the License, or
100SN/A   (at your option) any later version.
110SN/A
120SN/A   This program is distributed in the hope that it will be useful,
130SN/A   but WITHOUT ANY WARRANTY; without even the implied warranty of
140SN/A   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
150SN/A   GNU General Public License for more details.
160SN/A
170SN/A   You should have received a copy of the GNU General Public License
180SN/A   along with this program; if not, write to the Free Software
190SN/A   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
200SN/A   02110-1301, USA.  */
212362SN/A
222362SN/A#ifndef _ELF_390_H
232362SN/A#define _ELF_390_H
240SN/A
250SN/A/* Processor specific flags for the ELF header e_flags field.  */
260SN/A
270SN/A/* Symbol types.  */
280SN/A
290SN/A#define STACK_REG		15		/* Global Stack reg */
300SN/A#define BACKL_REG		14		/* Global Backlink reg */
310SN/A#define BASE_REG		13		/* Global Base reg */
320SN/A#define GOT_REG 		12		/* Holds addr of GOT */
330SN/A
340SN/A#include "elf/reloc-macros.h"
350SN/A
360SN/A/* Relocation types.  */
370SN/A
380SN/ASTART_RELOC_NUMBERS (elf_s390_reloc_type)
390SN/A    RELOC_NUMBER (R_390_NONE, 0)	/* No reloc.  */
400SN/A    RELOC_NUMBER (R_390_8, 1)		/* Direct 8 bit.  */
410SN/A    RELOC_NUMBER (R_390_12, 2)		/* Direct 12 bit.  */
420SN/A    RELOC_NUMBER (R_390_16, 3)		/* Direct 16 bit.  */
430SN/A    RELOC_NUMBER (R_390_32, 4)		/* Direct 32 bit.  */
440SN/A    RELOC_NUMBER (R_390_PC32, 5)	/* PC relative 32 bit.  */
450SN/A    RELOC_NUMBER (R_390_GOT12, 6)	/* 12 bit GOT offset.  */
460SN/A    RELOC_NUMBER (R_390_GOT32, 7)	/* 32 bit GOT offset.  */
470SN/A    RELOC_NUMBER (R_390_PLT32, 8)	/* 32 bit PC relative PLT address.  */
480SN/A    RELOC_NUMBER (R_390_COPY, 9)	/* Copy symbol at runtime.  */
490SN/A    RELOC_NUMBER (R_390_GLOB_DAT, 10)	/* Create GOT entry.  */
500SN/A    RELOC_NUMBER (R_390_JMP_SLOT, 11)	/* Create PLT entry.  */
510SN/A    RELOC_NUMBER (R_390_RELATIVE, 12)	/* Adjust by program base.  */
520SN/A    RELOC_NUMBER (R_390_GOTOFF32, 13)	/* 32 bit offset to GOT.  */
530SN/A    RELOC_NUMBER (R_390_GOTPC, 14)	/* 32 bit PC relative offset to GOT.  */
5485SN/A    RELOC_NUMBER (R_390_GOT16, 15)	/* 16 bit GOT offset.  */
550SN/A    RELOC_NUMBER (R_390_PC16, 16)	/* PC relative 16 bit.  */
560SN/A    RELOC_NUMBER (R_390_PC16DBL, 17)	/* PC relative 16 bit shifted by 1.  */
570SN/A    RELOC_NUMBER (R_390_PLT16DBL, 18)	/* 16 bit PC rel. PLT shifted by 1.  */
580SN/A    RELOC_NUMBER (R_390_PC32DBL, 19)	/* PC relative 32 bit shifted by 1.  */
590SN/A    RELOC_NUMBER (R_390_PLT32DBL, 20)	/* 32 bit PC rel. PLT shifted by 1.  */
600SN/A    RELOC_NUMBER (R_390_GOTPCDBL, 21)	/* 32 bit PC rel. GOT shifted by 1.  */
610SN/A    RELOC_NUMBER (R_390_64, 22)		/* Direct 64 bit.  */
620SN/A    RELOC_NUMBER (R_390_PC64, 23)	/* PC relative 64 bit.  */
630SN/A    RELOC_NUMBER (R_390_GOT64, 24)	/* 64 bit GOT offset.  */
640SN/A    RELOC_NUMBER (R_390_PLT64, 25)	/* 64 bit PC relative PLT address.  */
650SN/A    RELOC_NUMBER (R_390_GOTENT, 26)	/* 32 bit PC rel. to GOT entry >> 1. */
660SN/A    RELOC_NUMBER (R_390_GOTOFF16, 27)   /* 16 bit offset to GOT. */
670SN/A    RELOC_NUMBER (R_390_GOTOFF64, 28)   /* 64 bit offset to GOT. */
680SN/A    RELOC_NUMBER (R_390_GOTPLT12, 29)   /* 12 bit offset to jump slot.  */
690SN/A    RELOC_NUMBER (R_390_GOTPLT16, 30)   /* 16 bit offset to jump slot.  */
704079SN/A    RELOC_NUMBER (R_390_GOTPLT32, 31)   /* 32 bit offset to jump slot.  */
714079SN/A    RELOC_NUMBER (R_390_GOTPLT64, 32)   /* 64 bit offset to jump slot.  */
724079SN/A    RELOC_NUMBER (R_390_GOTPLTENT, 33)  /* 32 bit rel. offset to jump slot.  */
734079SN/A    RELOC_NUMBER (R_390_PLTOFF16, 34)   /* 16 bit offset from GOT to PLT. */
740SN/A    RELOC_NUMBER (R_390_PLTOFF32, 35)   /* 32 bit offset from GOT to PLT. */
750SN/A    RELOC_NUMBER (R_390_PLTOFF64, 36)   /* 16 bit offset from GOT to PLT. */
760SN/A    RELOC_NUMBER (R_390_TLS_LOAD, 37)	/* Tag for load insn in TLS code. */
770SN/A    RELOC_NUMBER (R_390_TLS_GDCALL, 38)	/* Tag for function call in general
780SN/A					   dynamic TLS code.  */
790SN/A    RELOC_NUMBER (R_390_TLS_LDCALL, 39)	/* Tag for function call in local
800SN/A					   dynamic TLS code.  */
810SN/A    RELOC_NUMBER (R_390_TLS_GD32, 40)	/* Direct 32 bit for general dynamic
820SN/A					   thread local data.  */
830SN/A    RELOC_NUMBER (R_390_TLS_GD64, 41)	/* Direct 64 bit for general dynamic
840SN/A					   thread local data.  */
850SN/A    RELOC_NUMBER (R_390_TLS_GOTIE12, 42)/* 12 bit GOT offset for static TLS
860SN/A					   block offset.  */
870SN/A    RELOC_NUMBER (R_390_TLS_GOTIE32, 43)/* 32 bit GOT offset for static TLS
880SN/A					   block offset.  */
890SN/A    RELOC_NUMBER (R_390_TLS_GOTIE64, 44)/* 64 bit GOT offset for static TLS
900SN/A					   block offset.  */
910SN/A    RELOC_NUMBER (R_390_TLS_LDM32, 45)	/* Direct 32 bit for local dynamic
920SN/A					   thread local data in LD code.  */
930SN/A    RELOC_NUMBER (R_390_TLS_LDM64, 46)	/* Direct 64 bit for local dynamic
940SN/A					   thread local data in LD code.  */
950SN/A    RELOC_NUMBER (R_390_TLS_IE32, 47)	/* 32 bit address of GOT entry for
960SN/A					   negated static TLS block offset.  */
970SN/A    RELOC_NUMBER (R_390_TLS_IE64, 48)	/* 64 bit address of GOT entry for
980SN/A					   negated static TLS block offset.  */
990SN/A    RELOC_NUMBER (R_390_TLS_IEENT, 49)	/* 32 bit rel. offset to GOT entry for
1000SN/A					   negated static TLS block offset.  */
1010SN/A    RELOC_NUMBER (R_390_TLS_LE32, 50)	/* 32 bit negated offset relative to
1020SN/A					   static TLS block.  */
1030SN/A    RELOC_NUMBER (R_390_TLS_LE64, 51)	/* 64 bit negated offset relative to
1040SN/A					   static TLS block.  */
1050SN/A    RELOC_NUMBER (R_390_TLS_LDO32, 52)	/* 32 bit offset relative to TLS
1060SN/A					   block.  */
1070SN/A    RELOC_NUMBER (R_390_TLS_LDO64, 53)	/* 64 bit offset relative to TLS
1080SN/A					   block.  */
1090SN/A    RELOC_NUMBER (R_390_TLS_DTPMOD, 54)	/* ID of module containing symbol.  */
1100SN/A    RELOC_NUMBER (R_390_TLS_DTPOFF, 55)	/* Offset in TLS block.  */
1110SN/A    RELOC_NUMBER (R_390_TLS_TPOFF, 56)	/* Negate offset in static TLS
1120SN/A					   block.  */
1130SN/A    RELOC_NUMBER (R_390_20, 57)		/* Direct 20 bit.  */
1140SN/A    RELOC_NUMBER (R_390_GOT20, 58)	/* 20 bit GOT offset.  */
1150SN/A    RELOC_NUMBER (R_390_GOTPLT20, 59)	/* 20 bit offset to jump slot.  */
1160SN/A    RELOC_NUMBER (R_390_TLS_GOTIE20, 60)/* 20 bit GOT offset for statis TLS
1170SN/A					   block offset.  */
1180SN/A    /* These are GNU extensions to enable C++ vtable garbage collection.  */
1190SN/A    RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
1200SN/A    RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
1210SN/AEND_RELOC_NUMBERS (R_390_max)
1220SN/A
1230SN/A#endif /* _ELF_390_H */
1240SN/A
1250SN/A
1260SN/A