Back to index

cell-binutils  2.17cvs20070401
cris.h
Go to the documentation of this file.
00001 /* CRIS ELF support for BFD.
00002    Copyright 2000, 2001, 2004 Free Software Foundation, Inc.
00003    Contributed by Axis Communications AB, Lund, Sweden.
00004    Written by Hans-Peter Nilsson.
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, Inc.,
00020 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00021 
00022 #ifndef _ELF_CRIS_H
00023 #define _ELF_CRIS_H
00024 
00025 #include "elf/reloc-macros.h"
00026 
00027 /* Relocations.  */
00028 START_RELOC_NUMBERS (elf_cris_reloc_type)
00029   RELOC_NUMBER (R_CRIS_NONE,              0)
00030   RELOC_NUMBER (R_CRIS_8,          1)
00031   RELOC_NUMBER (R_CRIS_16,         2)
00032   RELOC_NUMBER (R_CRIS_32,         3)
00033 
00034   /* The "PC" position is the location right after the relocation.  */
00035   RELOC_NUMBER (R_CRIS_8_PCREL,           4)
00036   RELOC_NUMBER (R_CRIS_16_PCREL,   5)
00037   RELOC_NUMBER (R_CRIS_32_PCREL,   6)
00038 
00039   RELOC_NUMBER (R_CRIS_GNU_VTINHERIT,     7)
00040   RELOC_NUMBER (R_CRIS_GNU_VTENTRY,       8)
00041 
00042   /* Copy contents at dynlinking.  Generated by the linker.
00043      The BFD equivalent is BFD_RELOC_CRIS_COPY.  */
00044   RELOC_NUMBER (R_CRIS_COPY, 9)
00045 
00046   /* Create GOT entry.  Generated by the linker.
00047      The BFD equivalent is BFD_RELOC_CRIS_GLOB_DAT.  */
00048   RELOC_NUMBER (R_CRIS_GLOB_DAT, 10)
00049 
00050   /* Create PLT entry.  Generated by the linker.
00051      The BFD equivalent is BFD_RELOC_CRIS_JUMP_SLOT.  */
00052   RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11)
00053 
00054   /* Adjust by program base.  Generated by the linker.
00055      The BFD equivalent is BFD_RELOC_CRIS_RELATIVE.  */
00056   RELOC_NUMBER (R_CRIS_RELATIVE, 12)
00057 
00058   /* A 16-bit offset to entry in GOT and request to create GOT entry for
00059      that symbol.
00060      The BFD equivalent is BFD_RELOC_CRIS_16_GOT.  */
00061   RELOC_NUMBER (R_CRIS_16_GOT, 13)
00062 
00063   /* A 32-bit offset to entry in GOT and request to create GOT entry for
00064      that symbol.
00065      The BFD equivalent is BFD_RELOC_CRIS_32_GOT.  */
00066   RELOC_NUMBER (R_CRIS_32_GOT, 14)
00067 
00068   /* A 16-bit offset to entry in PLT part of GOT and request to create PLT
00069      entry for that symbol.
00070      The BFD equivalent is BFD_RELOC_CRIS_16_GOTPLT.  */
00071   RELOC_NUMBER (R_CRIS_16_GOTPLT, 15)
00072 
00073   /* A 32-bit offset to entry in PLT part of GOT and request to create PLT
00074      entry for that symbol.
00075      The BFD equivalent is BFD_RELOC_CRIS_32_GOTPLT.  */
00076   RELOC_NUMBER (R_CRIS_32_GOTPLT, 16)
00077 
00078   /* A 32-bit offset from GOT to (local) symbol: no GOT entry should be
00079      necessary.
00080      The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL.  */
00081   RELOC_NUMBER (R_CRIS_32_GOTREL, 17)
00082 
00083   /* A 32-bit offset from GOT to entry for this symbol in PLT and request
00084      to create PLT entry for symbol.
00085      The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL.  */
00086   RELOC_NUMBER (R_CRIS_32_PLT_GOTREL, 18)
00087 
00088   /* A 32-bit offset from location after this relocation (addend specifies
00089      offset) to entry for this symbol in PLT and request to create PLT
00090      entry for symbol.
00091      The BFD equivalent is BFD_RELOC_CRIS_32_PLT_PCREL.  */
00092   RELOC_NUMBER (R_CRIS_32_PLT_PCREL, 19)
00093 
00094   /* No other relocs must be visible outside the assembler.  */
00095 
00096 END_RELOC_NUMBERS (R_CRIS_max)
00097 
00098 /* User symbols in this file have a leading underscore.  */
00099 #define EF_CRIS_UNDERSCORE         0x00000001
00100 
00101 /* This is a mask for different incompatible machine variants.  */
00102 #define EF_CRIS_VARIANT_MASK              0x0000000e
00103 
00104 /* Variant 0; may contain v0..10 object.  */
00105 #define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000
00106 
00107 /* Variant 1; contains v32 object.  */
00108 #define EF_CRIS_VARIANT_V32        0x00000002
00109 
00110 /* Variant 2; contains object compatible with v32 and v10.  */
00111 #define EF_CRIS_VARIANT_COMMON_V10_V32    0x00000004
00112 
00113 #endif /* _ELF_CRIS_H */