177298Sobrien/* CRIS ELF support for BFD. 2218822Sdim Copyright 2000, 2001, 2004 Free Software Foundation, Inc. 377298Sobrien Contributed by Axis Communications AB, Lund, Sweden. 477298Sobrien Written by Hans-Peter Nilsson. 577298Sobrien 677298SobrienThis file is part of BFD, the Binary File Descriptor library. 777298Sobrien 877298SobrienThis program is free software; you can redistribute it and/or modify 977298Sobrienit under the terms of the GNU General Public License as published by 1077298Sobrienthe Free Software Foundation; either version 2 of the License, or 1177298Sobrien(at your option) any later version. 1277298Sobrien 1377298SobrienThis program is distributed in the hope that it will be useful, 1477298Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of 1577298SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1677298SobrienGNU General Public License for more details. 1777298Sobrien 1877298SobrienYou should have received a copy of the GNU General Public License 1977298Sobrienalong with this program; if not, write to the Free Software Foundation, Inc., 20218822Sdim51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 2177298Sobrien 2277298Sobrien#ifndef _ELF_CRIS_H 2377298Sobrien#define _ELF_CRIS_H 2477298Sobrien 2577298Sobrien#include "elf/reloc-macros.h" 2677298Sobrien 2777298Sobrien/* Relocations. */ 2877298SobrienSTART_RELOC_NUMBERS (elf_cris_reloc_type) 2977298Sobrien RELOC_NUMBER (R_CRIS_NONE, 0) 3077298Sobrien RELOC_NUMBER (R_CRIS_8, 1) 3177298Sobrien RELOC_NUMBER (R_CRIS_16, 2) 3277298Sobrien RELOC_NUMBER (R_CRIS_32, 3) 3389857Sobrien 3489857Sobrien /* The "PC" position is the location right after the relocation. */ 3577298Sobrien RELOC_NUMBER (R_CRIS_8_PCREL, 4) 3677298Sobrien RELOC_NUMBER (R_CRIS_16_PCREL, 5) 3777298Sobrien RELOC_NUMBER (R_CRIS_32_PCREL, 6) 3877298Sobrien 3977298Sobrien RELOC_NUMBER (R_CRIS_GNU_VTINHERIT, 7) 4077298Sobrien RELOC_NUMBER (R_CRIS_GNU_VTENTRY, 8) 4177298Sobrien 4289857Sobrien /* Copy contents at dynlinking. Generated by the linker. 4389857Sobrien The BFD equivalent is BFD_RELOC_CRIS_COPY. */ 4489857Sobrien RELOC_NUMBER (R_CRIS_COPY, 9) 4589857Sobrien 4689857Sobrien /* Create GOT entry. Generated by the linker. 4789857Sobrien The BFD equivalent is BFD_RELOC_CRIS_GLOB_DAT. */ 4889857Sobrien RELOC_NUMBER (R_CRIS_GLOB_DAT, 10) 4989857Sobrien 5089857Sobrien /* Create PLT entry. Generated by the linker. 5189857Sobrien The BFD equivalent is BFD_RELOC_CRIS_JUMP_SLOT. */ 5289857Sobrien RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11) 5389857Sobrien 5489857Sobrien /* Adjust by program base. Generated by the linker. 5589857Sobrien The BFD equivalent is BFD_RELOC_CRIS_RELATIVE. */ 5689857Sobrien RELOC_NUMBER (R_CRIS_RELATIVE, 12) 5789857Sobrien 5889857Sobrien /* A 16-bit offset to entry in GOT and request to create GOT entry for 5989857Sobrien that symbol. 6089857Sobrien The BFD equivalent is BFD_RELOC_CRIS_16_GOT. */ 6189857Sobrien RELOC_NUMBER (R_CRIS_16_GOT, 13) 6289857Sobrien 6389857Sobrien /* A 32-bit offset to entry in GOT and request to create GOT entry for 6489857Sobrien that symbol. 6589857Sobrien The BFD equivalent is BFD_RELOC_CRIS_32_GOT. */ 6689857Sobrien RELOC_NUMBER (R_CRIS_32_GOT, 14) 6789857Sobrien 6889857Sobrien /* A 16-bit offset to entry in PLT part of GOT and request to create PLT 6989857Sobrien entry for that symbol. 7089857Sobrien The BFD equivalent is BFD_RELOC_CRIS_16_GOTPLT. */ 7189857Sobrien RELOC_NUMBER (R_CRIS_16_GOTPLT, 15) 7289857Sobrien 7389857Sobrien /* A 32-bit offset to entry in PLT part of GOT and request to create PLT 7489857Sobrien entry for that symbol. 7589857Sobrien The BFD equivalent is BFD_RELOC_CRIS_32_GOTPLT. */ 7689857Sobrien RELOC_NUMBER (R_CRIS_32_GOTPLT, 16) 7789857Sobrien 7889857Sobrien /* A 32-bit offset from GOT to (local) symbol: no GOT entry should be 7989857Sobrien necessary. 8089857Sobrien The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */ 8189857Sobrien RELOC_NUMBER (R_CRIS_32_GOTREL, 17) 8289857Sobrien 8389857Sobrien /* A 32-bit offset from GOT to entry for this symbol in PLT and request 8489857Sobrien to create PLT entry for symbol. 8589857Sobrien The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */ 8689857Sobrien RELOC_NUMBER (R_CRIS_32_PLT_GOTREL, 18) 8789857Sobrien 8889857Sobrien /* A 32-bit offset from location after this relocation (addend specifies 8989857Sobrien offset) to entry for this symbol in PLT and request to create PLT 9089857Sobrien entry for symbol. 9189857Sobrien The BFD equivalent is BFD_RELOC_CRIS_32_PLT_PCREL. */ 9289857Sobrien RELOC_NUMBER (R_CRIS_32_PLT_PCREL, 19) 9389857Sobrien 9477298Sobrien /* No other relocs must be visible outside the assembler. */ 9577298Sobrien 9677298SobrienEND_RELOC_NUMBERS (R_CRIS_max) 9777298Sobrien 9877298Sobrien/* User symbols in this file have a leading underscore. */ 9977298Sobrien#define EF_CRIS_UNDERSCORE 0x00000001 10077298Sobrien 101218822Sdim/* This is a mask for different incompatible machine variants. */ 102218822Sdim#define EF_CRIS_VARIANT_MASK 0x0000000e 103218822Sdim 104218822Sdim/* Variant 0; may contain v0..10 object. */ 105218822Sdim#define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000 106218822Sdim 107218822Sdim/* Variant 1; contains v32 object. */ 108218822Sdim#define EF_CRIS_VARIANT_V32 0x00000002 109218822Sdim 110218822Sdim/* Variant 2; contains object compatible with v32 and v10. */ 111218822Sdim#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 112218822Sdim 11377298Sobrien#endif /* _ELF_CRIS_H */ 114