Back to index

cell-binutils  2.17cvs20070401
s390.h
Go to the documentation of this file.
00001 /* 390 ELF support for BFD.
00002    Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
00003    Contributed by Carl B. Pedersen and Martin Schwidefsky.
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
00020    02110-1301, USA.  */
00021 
00022 #ifndef _ELF_390_H
00023 #define _ELF_390_H
00024 
00025 /* Processor specific flags for the ELF header e_flags field.  */
00026 
00027 /* Symbol types.  */
00028 
00029 #define STACK_REG           15            /* Global Stack reg */
00030 #define BACKL_REG           14            /* Global Backlink reg */
00031 #define BASE_REG            13            /* Global Base reg */
00032 #define GOT_REG             12            /* Holds addr of GOT */
00033 
00034 #include "elf/reloc-macros.h"
00035 
00036 /* Relocation types.  */
00037 
00038 START_RELOC_NUMBERS (elf_s390_reloc_type)
00039     RELOC_NUMBER (R_390_NONE, 0)   /* No reloc.  */
00040     RELOC_NUMBER (R_390_8, 1)             /* Direct 8 bit.  */
00041     RELOC_NUMBER (R_390_12, 2)            /* Direct 12 bit.  */
00042     RELOC_NUMBER (R_390_16, 3)            /* Direct 16 bit.  */
00043     RELOC_NUMBER (R_390_32, 4)            /* Direct 32 bit.  */
00044     RELOC_NUMBER (R_390_PC32, 5)   /* PC relative 32 bit.  */
00045     RELOC_NUMBER (R_390_GOT12, 6)  /* 12 bit GOT offset.  */
00046     RELOC_NUMBER (R_390_GOT32, 7)  /* 32 bit GOT offset.  */
00047     RELOC_NUMBER (R_390_PLT32, 8)  /* 32 bit PC relative PLT address.  */
00048     RELOC_NUMBER (R_390_COPY, 9)   /* Copy symbol at runtime.  */
00049     RELOC_NUMBER (R_390_GLOB_DAT, 10)     /* Create GOT entry.  */
00050     RELOC_NUMBER (R_390_JMP_SLOT, 11)     /* Create PLT entry.  */
00051     RELOC_NUMBER (R_390_RELATIVE, 12)     /* Adjust by program base.  */
00052     RELOC_NUMBER (R_390_GOTOFF32, 13)     /* 32 bit offset to GOT.  */
00053     RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT.  */
00054     RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset.  */
00055     RELOC_NUMBER (R_390_PC16, 16)  /* PC relative 16 bit.  */
00056     RELOC_NUMBER (R_390_PC16DBL, 17)      /* PC relative 16 bit shifted by 1.  */
00057     RELOC_NUMBER (R_390_PLT16DBL, 18)     /* 16 bit PC rel. PLT shifted by 1.  */
00058     RELOC_NUMBER (R_390_PC32DBL, 19)      /* PC relative 32 bit shifted by 1.  */
00059     RELOC_NUMBER (R_390_PLT32DBL, 20)     /* 32 bit PC rel. PLT shifted by 1.  */
00060     RELOC_NUMBER (R_390_GOTPCDBL, 21)     /* 32 bit PC rel. GOT shifted by 1.  */
00061     RELOC_NUMBER (R_390_64, 22)           /* Direct 64 bit.  */
00062     RELOC_NUMBER (R_390_PC64, 23)  /* PC relative 64 bit.  */
00063     RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset.  */
00064     RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address.  */
00065     RELOC_NUMBER (R_390_GOTENT, 26)       /* 32 bit PC rel. to GOT entry >> 1. */
00066     RELOC_NUMBER (R_390_GOTOFF16, 27)   /* 16 bit offset to GOT. */
00067     RELOC_NUMBER (R_390_GOTOFF64, 28)   /* 64 bit offset to GOT. */
00068     RELOC_NUMBER (R_390_GOTPLT12, 29)   /* 12 bit offset to jump slot.  */
00069     RELOC_NUMBER (R_390_GOTPLT16, 30)   /* 16 bit offset to jump slot.  */
00070     RELOC_NUMBER (R_390_GOTPLT32, 31)   /* 32 bit offset to jump slot.  */
00071     RELOC_NUMBER (R_390_GOTPLT64, 32)   /* 64 bit offset to jump slot.  */
00072     RELOC_NUMBER (R_390_GOTPLTENT, 33)  /* 32 bit rel. offset to jump slot.  */
00073     RELOC_NUMBER (R_390_PLTOFF16, 34)   /* 16 bit offset from GOT to PLT. */
00074     RELOC_NUMBER (R_390_PLTOFF32, 35)   /* 32 bit offset from GOT to PLT. */
00075     RELOC_NUMBER (R_390_PLTOFF64, 36)   /* 16 bit offset from GOT to PLT. */
00076     RELOC_NUMBER (R_390_TLS_LOAD, 37)     /* Tag for load insn in TLS code. */
00077     RELOC_NUMBER (R_390_TLS_GDCALL, 38)   /* Tag for function call in general
00078                                       dynamic TLS code.  */
00079     RELOC_NUMBER (R_390_TLS_LDCALL, 39)   /* Tag for function call in local
00080                                       dynamic TLS code.  */
00081     RELOC_NUMBER (R_390_TLS_GD32, 40)     /* Direct 32 bit for general dynamic
00082                                       thread local data.  */
00083     RELOC_NUMBER (R_390_TLS_GD64, 41)     /* Direct 64 bit for general dynamic
00084                                       thread local data.  */
00085     RELOC_NUMBER (R_390_TLS_GOTIE12, 42)/* 12 bit GOT offset for static TLS
00086                                       block offset.  */
00087     RELOC_NUMBER (R_390_TLS_GOTIE32, 43)/* 32 bit GOT offset for static TLS
00088                                       block offset.  */
00089     RELOC_NUMBER (R_390_TLS_GOTIE64, 44)/* 64 bit GOT offset for static TLS
00090                                       block offset.  */
00091     RELOC_NUMBER (R_390_TLS_LDM32, 45)    /* Direct 32 bit for local dynamic
00092                                       thread local data in LD code.  */
00093     RELOC_NUMBER (R_390_TLS_LDM64, 46)    /* Direct 64 bit for local dynamic
00094                                       thread local data in LD code.  */
00095     RELOC_NUMBER (R_390_TLS_IE32, 47)     /* 32 bit address of GOT entry for
00096                                       negated static TLS block offset.  */
00097     RELOC_NUMBER (R_390_TLS_IE64, 48)     /* 64 bit address of GOT entry for
00098                                       negated static TLS block offset.  */
00099     RELOC_NUMBER (R_390_TLS_IEENT, 49)    /* 32 bit rel. offset to GOT entry for
00100                                       negated static TLS block offset.  */
00101     RELOC_NUMBER (R_390_TLS_LE32, 50)     /* 32 bit negated offset relative to
00102                                       static TLS block.  */
00103     RELOC_NUMBER (R_390_TLS_LE64, 51)     /* 64 bit negated offset relative to
00104                                       static TLS block.  */
00105     RELOC_NUMBER (R_390_TLS_LDO32, 52)    /* 32 bit offset relative to TLS
00106                                       block.  */
00107     RELOC_NUMBER (R_390_TLS_LDO64, 53)    /* 64 bit offset relative to TLS
00108                                       block.  */
00109     RELOC_NUMBER (R_390_TLS_DTPMOD, 54)   /* ID of module containing symbol.  */
00110     RELOC_NUMBER (R_390_TLS_DTPOFF, 55)   /* Offset in TLS block.  */
00111     RELOC_NUMBER (R_390_TLS_TPOFF, 56)    /* Negate offset in static TLS
00112                                       block.  */
00113     RELOC_NUMBER (R_390_20, 57)           /* Direct 20 bit.  */
00114     RELOC_NUMBER (R_390_GOT20, 58) /* 20 bit GOT offset.  */
00115     RELOC_NUMBER (R_390_GOTPLT20, 59)     /* 20 bit offset to jump slot.  */
00116     RELOC_NUMBER (R_390_TLS_GOTIE20, 60)/* 20 bit GOT offset for statis TLS
00117                                       block offset.  */
00118     /* These are GNU extensions to enable C++ vtable garbage collection.  */
00119     RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
00120     RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
00121 END_RELOC_NUMBERS (R_390_max)
00122 
00123 #endif /* _ELF_390_H */
00124 
00125