xtensa.h revision 130561
1/* Xtensa ELF support for BFD. 2 Copyright 2003 Free Software Foundation, Inc. 3 Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. 4 5 This file is part of BFD, the Binary File Descriptor library. 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 20 USA. */ 21 22/* This file holds definitions specific to the Xtensa ELF ABI. */ 23 24#ifndef _ELF_XTENSA_H 25#define _ELF_XTENSA_H 26 27#include "elf/reloc-macros.h" 28 29/* Relocations. */ 30START_RELOC_NUMBERS (elf_xtensa_reloc_type) 31 RELOC_NUMBER (R_XTENSA_NONE, 0) 32 RELOC_NUMBER (R_XTENSA_32, 1) 33 RELOC_NUMBER (R_XTENSA_RTLD, 2) 34 RELOC_NUMBER (R_XTENSA_GLOB_DAT, 3) 35 RELOC_NUMBER (R_XTENSA_JMP_SLOT, 4) 36 RELOC_NUMBER (R_XTENSA_RELATIVE, 5) 37 RELOC_NUMBER (R_XTENSA_PLT, 6) 38 RELOC_NUMBER (R_XTENSA_OP0, 8) 39 RELOC_NUMBER (R_XTENSA_OP1, 9) 40 RELOC_NUMBER (R_XTENSA_OP2, 10) 41 RELOC_NUMBER (R_XTENSA_ASM_EXPAND, 11) 42 RELOC_NUMBER (R_XTENSA_ASM_SIMPLIFY, 12) 43 RELOC_NUMBER (R_XTENSA_GNU_VTINHERIT, 15) 44 RELOC_NUMBER (R_XTENSA_GNU_VTENTRY, 16) 45END_RELOC_NUMBERS (R_XTENSA_max) 46 47/* Processor-specific flags for the ELF header e_flags field. */ 48 49/* Four-bit Xtensa machine type field. */ 50#define EF_XTENSA_MACH 0x0000000f 51 52/* Various CPU types. */ 53#define E_XTENSA_MACH 0x00000000 54 55/* Leave bits 0xf0 alone in case we ever have more than 16 cpu types. 56 Highly unlikely, but what the heck. */ 57 58#define EF_XTENSA_XT_INSN 0x00000100 59#define EF_XTENSA_XT_LIT 0x00000200 60 61 62/* Processor-specific dynamic array tags. */ 63 64/* Offset of the table that records the GOT location(s). */ 65#define DT_XTENSA_GOT_LOC_OFF 0x70000000 66 67/* Number of entries in the GOT location table. */ 68#define DT_XTENSA_GOT_LOC_SZ 0x70000001 69 70 71/* Definitions for instruction and literal property tables. The 72 tables for ".gnu.linkonce.*" sections are placed in the following 73 sections: 74 75 instruction tables: .gnu.linkonce.x.* 76 literal tables: .gnu.linkonce.p.* 77*/ 78 79#define XTENSA_INSN_SEC_NAME ".xt.insn" 80#define XTENSA_LIT_SEC_NAME ".xt.lit" 81 82typedef struct property_table_entry_t 83{ 84 bfd_vma address; 85 bfd_vma size; 86} property_table_entry; 87 88#endif /* _ELF_XTENSA_H */ 89