1*3d8817e4Smiod /* CRIS ELF support for BFD. 2*3d8817e4Smiod Copyright 2000, 2001, 2004 Free Software Foundation, Inc. 3*3d8817e4Smiod Contributed by Axis Communications AB, Lund, Sweden. 4*3d8817e4Smiod Written by Hans-Peter Nilsson. 5*3d8817e4Smiod 6*3d8817e4Smiod This file is part of BFD, the Binary File Descriptor library. 7*3d8817e4Smiod 8*3d8817e4Smiod This program is free software; you can redistribute it and/or modify 9*3d8817e4Smiod it under the terms of the GNU General Public License as published by 10*3d8817e4Smiod the Free Software Foundation; either version 2 of the License, or 11*3d8817e4Smiod (at your option) any later version. 12*3d8817e4Smiod 13*3d8817e4Smiod This program is distributed in the hope that it will be useful, 14*3d8817e4Smiod but WITHOUT ANY WARRANTY; without even the implied warranty of 15*3d8817e4Smiod MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*3d8817e4Smiod GNU General Public License for more details. 17*3d8817e4Smiod 18*3d8817e4Smiod You should have received a copy of the GNU General Public License 19*3d8817e4Smiod along with this program; if not, write to the Free Software Foundation, Inc., 20*3d8817e4Smiod 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 21*3d8817e4Smiod 22*3d8817e4Smiod #ifndef _ELF_CRIS_H 23*3d8817e4Smiod #define _ELF_CRIS_H 24*3d8817e4Smiod 25*3d8817e4Smiod #include "elf/reloc-macros.h" 26*3d8817e4Smiod 27*3d8817e4Smiod /* Relocations. */ 28*3d8817e4Smiod START_RELOC_NUMBERS (elf_cris_reloc_type) 29*3d8817e4Smiod RELOC_NUMBER (R_CRIS_NONE, 0) 30*3d8817e4Smiod RELOC_NUMBER (R_CRIS_8, 1) 31*3d8817e4Smiod RELOC_NUMBER (R_CRIS_16, 2) 32*3d8817e4Smiod RELOC_NUMBER (R_CRIS_32, 3) 33*3d8817e4Smiod 34*3d8817e4Smiod /* The "PC" position is the location right after the relocation. */ 35*3d8817e4Smiod RELOC_NUMBER (R_CRIS_8_PCREL, 4) 36*3d8817e4Smiod RELOC_NUMBER (R_CRIS_16_PCREL, 5) 37*3d8817e4Smiod RELOC_NUMBER (R_CRIS_32_PCREL, 6) 38*3d8817e4Smiod 39*3d8817e4Smiod RELOC_NUMBER (R_CRIS_GNU_VTINHERIT, 7) 40*3d8817e4Smiod RELOC_NUMBER (R_CRIS_GNU_VTENTRY, 8) 41*3d8817e4Smiod 42*3d8817e4Smiod /* Copy contents at dynlinking. Generated by the linker. 43*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_COPY. */ 44*3d8817e4Smiod RELOC_NUMBER (R_CRIS_COPY, 9) 45*3d8817e4Smiod 46*3d8817e4Smiod /* Create GOT entry. Generated by the linker. 47*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_GLOB_DAT. */ 48*3d8817e4Smiod RELOC_NUMBER (R_CRIS_GLOB_DAT, 10) 49*3d8817e4Smiod 50*3d8817e4Smiod /* Create PLT entry. Generated by the linker. 51*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_JUMP_SLOT. */ 52*3d8817e4Smiod RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11) 53*3d8817e4Smiod 54*3d8817e4Smiod /* Adjust by program base. Generated by the linker. 55*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_RELATIVE. */ 56*3d8817e4Smiod RELOC_NUMBER (R_CRIS_RELATIVE, 12) 57*3d8817e4Smiod 58*3d8817e4Smiod /* A 16-bit offset to entry in GOT and request to create GOT entry for 59*3d8817e4Smiod that symbol. 60*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_16_GOT. */ 61*3d8817e4Smiod RELOC_NUMBER (R_CRIS_16_GOT, 13) 62*3d8817e4Smiod 63*3d8817e4Smiod /* A 32-bit offset to entry in GOT and request to create GOT entry for 64*3d8817e4Smiod that symbol. 65*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_32_GOT. */ 66*3d8817e4Smiod RELOC_NUMBER (R_CRIS_32_GOT, 14) 67*3d8817e4Smiod 68*3d8817e4Smiod /* A 16-bit offset to entry in PLT part of GOT and request to create PLT 69*3d8817e4Smiod entry for that symbol. 70*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_16_GOTPLT. */ 71*3d8817e4Smiod RELOC_NUMBER (R_CRIS_16_GOTPLT, 15) 72*3d8817e4Smiod 73*3d8817e4Smiod /* A 32-bit offset to entry in PLT part of GOT and request to create PLT 74*3d8817e4Smiod entry for that symbol. 75*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_32_GOTPLT. */ 76*3d8817e4Smiod RELOC_NUMBER (R_CRIS_32_GOTPLT, 16) 77*3d8817e4Smiod 78*3d8817e4Smiod /* A 32-bit offset from GOT to (local) symbol: no GOT entry should be 79*3d8817e4Smiod necessary. 80*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */ 81*3d8817e4Smiod RELOC_NUMBER (R_CRIS_32_GOTREL, 17) 82*3d8817e4Smiod 83*3d8817e4Smiod /* A 32-bit offset from GOT to entry for this symbol in PLT and request 84*3d8817e4Smiod to create PLT entry for symbol. 85*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */ 86*3d8817e4Smiod RELOC_NUMBER (R_CRIS_32_PLT_GOTREL, 18) 87*3d8817e4Smiod 88*3d8817e4Smiod /* A 32-bit offset from location after this relocation (addend specifies 89*3d8817e4Smiod offset) to entry for this symbol in PLT and request to create PLT 90*3d8817e4Smiod entry for symbol. 91*3d8817e4Smiod The BFD equivalent is BFD_RELOC_CRIS_32_PLT_PCREL. */ 92*3d8817e4Smiod RELOC_NUMBER (R_CRIS_32_PLT_PCREL, 19) 93*3d8817e4Smiod 94*3d8817e4Smiod /* No other relocs must be visible outside the assembler. */ 95*3d8817e4Smiod 96*3d8817e4Smiod END_RELOC_NUMBERS (R_CRIS_max) 97*3d8817e4Smiod 98*3d8817e4Smiod /* User symbols in this file have a leading underscore. */ 99*3d8817e4Smiod #define EF_CRIS_UNDERSCORE 0x00000001 100*3d8817e4Smiod 101*3d8817e4Smiod /* This is a mask for different incompatible machine variants. */ 102*3d8817e4Smiod #define EF_CRIS_VARIANT_MASK 0x0000000e 103*3d8817e4Smiod 104*3d8817e4Smiod /* Variant 0; may contain v0..10 object. */ 105*3d8817e4Smiod #define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000 106*3d8817e4Smiod 107*3d8817e4Smiod /* Variant 1; contains v32 object. */ 108*3d8817e4Smiod #define EF_CRIS_VARIANT_V32 0x00000002 109*3d8817e4Smiod 110*3d8817e4Smiod /* Variant 2; contains object compatible with v32 and v10. */ 111*3d8817e4Smiod #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 112*3d8817e4Smiod 113*3d8817e4Smiod #endif /* _ELF_CRIS_H */ 114