| 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, USA. */
|
|---|
| 20 |
|
|---|
| 21 | /* This file holds definitions specific to the Xtensa ELF ABI. */
|
|---|
| 22 |
|
|---|
| 23 | #ifndef _ELF_XTENSA_H
|
|---|
| 24 | #define _ELF_XTENSA_H
|
|---|
| 25 |
|
|---|
| 26 | #include "elf/reloc-macros.h"
|
|---|
| 27 |
|
|---|
| 28 | /* Relocations. */
|
|---|
| 29 | START_RELOC_NUMBERS (elf_xtensa_reloc_type)
|
|---|
| 30 | RELOC_NUMBER (R_XTENSA_NONE, 0)
|
|---|
| 31 | RELOC_NUMBER (R_XTENSA_32, 1)
|
|---|
| 32 | RELOC_NUMBER (R_XTENSA_RTLD, 2)
|
|---|
| 33 | RELOC_NUMBER (R_XTENSA_GLOB_DAT, 3)
|
|---|
| 34 | RELOC_NUMBER (R_XTENSA_JMP_SLOT, 4)
|
|---|
| 35 | RELOC_NUMBER (R_XTENSA_RELATIVE, 5)
|
|---|
| 36 | RELOC_NUMBER (R_XTENSA_PLT, 6)
|
|---|
| 37 | RELOC_NUMBER (R_XTENSA_OP0, 8)
|
|---|
| 38 | RELOC_NUMBER (R_XTENSA_OP1, 9)
|
|---|
| 39 | RELOC_NUMBER (R_XTENSA_OP2, 10)
|
|---|
| 40 | RELOC_NUMBER (R_XTENSA_ASM_EXPAND, 11)
|
|---|
| 41 | RELOC_NUMBER (R_XTENSA_ASM_SIMPLIFY, 12)
|
|---|
| 42 | RELOC_NUMBER (R_XTENSA_GNU_VTINHERIT, 15)
|
|---|
| 43 | RELOC_NUMBER (R_XTENSA_GNU_VTENTRY, 16)
|
|---|
| 44 | END_RELOC_NUMBERS (R_XTENSA_max)
|
|---|
| 45 |
|
|---|
| 46 | /* Processor-specific flags for the ELF header e_flags field. */
|
|---|
| 47 |
|
|---|
| 48 | /* Four-bit Xtensa machine type field. */
|
|---|
| 49 | #define EF_XTENSA_MACH 0x0000000f
|
|---|
| 50 |
|
|---|
| 51 | /* Various CPU types. */
|
|---|
| 52 | #define E_XTENSA_MACH 0x00000000
|
|---|
| 53 |
|
|---|
| 54 | /* Leave bits 0xf0 alone in case we ever have more than 16 cpu types.
|
|---|
| 55 | Highly unlikely, but what the heck. */
|
|---|
| 56 |
|
|---|
| 57 | #define EF_XTENSA_XT_INSN 0x00000100
|
|---|
| 58 | #define EF_XTENSA_XT_LIT 0x00000200
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | /* Processor-specific dynamic array tags. */
|
|---|
| 62 |
|
|---|
| 63 | /* Offset of the table that records the GOT location(s). */
|
|---|
| 64 | #define DT_XTENSA_GOT_LOC_OFF 0x70000000
|
|---|
| 65 |
|
|---|
| 66 | /* Number of entries in the GOT location table. */
|
|---|
| 67 | #define DT_XTENSA_GOT_LOC_SZ 0x70000001
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 | /* Definitions for instruction and literal property tables. The
|
|---|
| 71 | instruction tables for ".gnu.linkonce.t.*" sections are placed in
|
|---|
| 72 | the following sections:
|
|---|
| 73 |
|
|---|
| 74 | instruction tables: .gnu.linkonce.x.*
|
|---|
| 75 | literal tables: .gnu.linkonce.p.*
|
|---|
| 76 | */
|
|---|
| 77 |
|
|---|
| 78 | #define XTENSA_INSN_SEC_NAME ".xt.insn"
|
|---|
| 79 | #define XTENSA_LIT_SEC_NAME ".xt.lit"
|
|---|
| 80 |
|
|---|
| 81 | typedef struct property_table_entry_t
|
|---|
| 82 | {
|
|---|
| 83 | bfd_vma address;
|
|---|
| 84 | bfd_vma size;
|
|---|
| 85 | } property_table_entry;
|
|---|
| 86 |
|
|---|
| 87 | #endif /* _ELF_XTENSA_H */
|
|---|