Back to index

cell-binutils  2.17cvs20070401
x86-64.h
Go to the documentation of this file.
00001 /* x86_64 ELF support for BFD.
00002    Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006
00003    Free Software Foundation, Inc.
00004    Contributed by Jan Hubicka <jh@suse.cz>
00005 
00006    This file is part of BFD, the Binary File Descriptor library.
00007 
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2 of the License, or
00011    (at your option) any later version.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software Foundation,
00020    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00021 
00022 #ifndef _ELF_X86_64_H
00023 #define _ELF_X86_64_H
00024 
00025 #include "elf/reloc-macros.h"
00026 
00027 START_RELOC_NUMBERS (elf_x86_64_reloc_type)
00028      RELOC_NUMBER (R_X86_64_NONE,     0)      /* No reloc */
00029      RELOC_NUMBER (R_X86_64_64,       1)      /* Direct 64 bit  */
00030      RELOC_NUMBER (R_X86_64_PC32,     2)      /* PC relative 32 bit signed */
00031      RELOC_NUMBER (R_X86_64_GOT32,    3)      /* 32 bit GOT entry */
00032      RELOC_NUMBER (R_X86_64_PLT32,    4)      /* 32 bit PLT address */
00033      RELOC_NUMBER (R_X86_64_COPY,     5)      /* Copy symbol at runtime */
00034      RELOC_NUMBER (R_X86_64_GLOB_DAT, 6)      /* Create GOT entry */
00035      RELOC_NUMBER (R_X86_64_JUMP_SLOT,7)      /* Create PLT entry */
00036      RELOC_NUMBER (R_X86_64_RELATIVE, 8)      /* Adjust by program base */
00037      RELOC_NUMBER (R_X86_64_GOTPCREL, 9)      /* 32 bit signed pc relative
00038                                                  offset to GOT entry */
00039      RELOC_NUMBER (R_X86_64_32,       10)     /* Direct 32 bit zero extended */
00040      RELOC_NUMBER (R_X86_64_32S,      11)     /* Direct 32 bit sign extended */
00041      RELOC_NUMBER (R_X86_64_16,       12)     /* Direct 16 bit zero extended */
00042      RELOC_NUMBER (R_X86_64_PC16,     13)     /* 16 bit sign extended pc relative*/
00043      RELOC_NUMBER (R_X86_64_8,        14)     /* Direct 8 bit sign extended */
00044      RELOC_NUMBER (R_X86_64_PC8,      15)     /* 8 bit sign extended pc relative*/
00045      RELOC_NUMBER (R_X86_64_DTPMOD64, 16)     /* ID of module containing symbol */
00046      RELOC_NUMBER (R_X86_64_DTPOFF64, 17)     /* Offset in TLS block */
00047      RELOC_NUMBER (R_X86_64_TPOFF64,  18)     /* Offset in initial TLS block */
00048      RELOC_NUMBER (R_X86_64_TLSGD,    19)     /* PC relative offset to GD GOT block */
00049      RELOC_NUMBER (R_X86_64_TLSLD,    20)     /* PC relative offset to LD GOT block */
00050      RELOC_NUMBER (R_X86_64_DTPOFF32, 21)     /* Offset in TLS block */
00051      RELOC_NUMBER (R_X86_64_GOTTPOFF, 22)     /* PC relative offset to IE GOT entry */
00052      RELOC_NUMBER (R_X86_64_TPOFF32,  23)     /* Offset in initial TLS block */
00053      RELOC_NUMBER (R_X86_64_PC64,     24)     /* PC relative 64 bit */
00054      RELOC_NUMBER (R_X86_64_GOTOFF64, 25)     /* 64 bit offset to GOT */
00055      RELOC_NUMBER (R_X86_64_GOTPC32,  26)     /* 32 bit signed pc relative
00056                                                  offset to GOT */
00057      RELOC_NUMBER (R_X86_64_GOT64,    27)     /* 64 bit GOT entry offset */
00058      RELOC_NUMBER (R_X86_64_GOTPCREL64, 28)   /* 64 bit signed pc relative
00059                                            offset to GOT entry */
00060      RELOC_NUMBER (R_X86_64_GOTPC64,  29)     /* 64 bit signed pc relative
00061                                            offset to GOT */
00062      RELOC_NUMBER (R_X86_64_GOTPLT64, 30)     /* like GOT64, but indicates
00063                                            that PLT entry is needed */
00064      RELOC_NUMBER (R_X86_64_PLTOFF64, 31)     /* 64 bit GOT relative offset
00065                                            to PLT entry */
00066      /* 32 .. 33 */
00067      RELOC_NUMBER (R_X86_64_GOTPC32_TLSDESC, 34)
00068                                          /* 32 bit signed pc relative
00069                                            offset to TLS descriptor
00070                                            in the GOT.  */
00071      RELOC_NUMBER (R_X86_64_TLSDESC_CALL, 35) /* Relaxable call through TLS
00072                                            descriptor.  */
00073      RELOC_NUMBER (R_X86_64_TLSDESC, 36)      /* 2x64-bit TLS descriptor.  */
00074      RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250)       /* GNU C++ hack  */
00075      RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251)         /* GNU C++ hack  */
00076 END_RELOC_NUMBERS (R_X86_64_max)
00077 
00078 /* Processor specific section types.  */
00079 
00080 #define SHT_X86_64_UNWIND   0x70000001    /* unwind information */
00081 
00082 /* Like SHN_COMMON but the symbol will be allocated in the .lbss
00083    section.  */
00084 #define SHN_X86_64_LCOMMON  0xff02
00085 
00086 #define SHF_X86_64_LARGE    0x10000000
00087 #endif