/src/binutils-gdb/include/elf/bfin.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* Blackfin ELF support for BFD. |
2 | | Copyright (C) 2005-2025 Free Software Foundation, Inc. |
3 | | |
4 | | This file is part of BFD, the Binary File Descriptor library. |
5 | | |
6 | | This program is free software; you can redistribute it and/or modify |
7 | | it under the terms of the GNU General Public License as published by |
8 | | the Free Software Foundation; either version 3 of the License, or |
9 | | (at your option) any later version. |
10 | | |
11 | | This program is distributed in the hope that it will be useful, |
12 | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | | GNU General Public License for more details. |
15 | | |
16 | | You should have received a copy of the GNU General Public License |
17 | | along with this program; if not, write to the Free Software Foundation, |
18 | | Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ |
19 | | |
20 | | #ifndef _ELF_BFIN_H |
21 | | #define _ELF_BFIN_H |
22 | | |
23 | | #include "elf/reloc-macros.h" |
24 | | |
25 | 58.9k | START_RELOC_NUMBERS (elf_bfin_reloc_type) |
26 | 58.9k | RELOC_NUMBER (R_BFIN_UNUSED0, 0x00) /* relocation type 0 is not defined */ |
27 | 1.21k | RELOC_NUMBER (R_BFIN_PCREL5M2, 0x01) /* LSETUP part a */ |
28 | 620 | RELOC_NUMBER (R_BFIN_UNUSED1, 0x02) /* relocation type 2 is not defined */ |
29 | 769 | RELOC_NUMBER (R_BFIN_PCREL10, 0x03) /* type 3, 0x00) if cc jump <target> */ |
30 | 671 | RELOC_NUMBER (R_BFIN_PCREL12_JUMP, 0x04) /* type 4, 0x00) jump <target> */ |
31 | 974 | RELOC_NUMBER (R_BFIN_RIMM16, 0x05) /* type 0x5, 0x00) rN = <target> */ |
32 | 394 | RELOC_NUMBER (R_BFIN_LUIMM16, 0x06) /* # 0x6, 0x00) preg.l=<target> Load imm 16 to lower half */ |
33 | 417 | RELOC_NUMBER (R_BFIN_HUIMM16, 0x07) /* # 0x7, 0x00) preg.h=<target> Load imm 16 to upper half */ |
34 | 1.23k | RELOC_NUMBER (R_BFIN_PCREL12_JUMP_S, 0x08) /* # 0x8 jump.s <target> */ |
35 | 1.67k | RELOC_NUMBER (R_BFIN_PCREL24_JUMP_X, 0x09) /* # 0x9 jump.x <target> */ |
36 | 633 | RELOC_NUMBER (R_BFIN_PCREL24, 0x0a) /* # 0xa call <target> , 0x00) not expandable */ |
37 | 518 | RELOC_NUMBER (R_BFIN_UNUSEDB, 0x0b) /* # 0xb not generated */ |
38 | 259 | RELOC_NUMBER (R_BFIN_UNUSEDC, 0x0c) /* # 0xc not used */ |
39 | 225 | RELOC_NUMBER (R_BFIN_PCREL24_JUMP_L, 0x0d) /* 0xd jump.l <target> */ |
40 | 1.51k | RELOC_NUMBER (R_BFIN_PCREL24_CALL_X, 0x0e) /* 0xE, 0x00) call.x <target> if <target> is above 24 bit limit call through P1 */ |
41 | 356 | RELOC_NUMBER (R_BFIN_VAR_EQ_SYMB, 0x0f) /* 0xf, 0x00) linker should treat it same as 0x12 */ |
42 | 542 | RELOC_NUMBER (R_BFIN_BYTE_DATA, 0x10) /* 0x10, 0x00) .byte var = symbol */ |
43 | 1.41k | RELOC_NUMBER (R_BFIN_BYTE2_DATA, 0x11) /* 0x11, 0x00) .byte2 var = symbol */ |
44 | 456 | RELOC_NUMBER (R_BFIN_BYTE4_DATA, 0x12) /* 0x12, 0x00) .byte4 var = symbol and .var var=symbol */ |
45 | 264 | RELOC_NUMBER (R_BFIN_PCREL11, 0x13) /* 0x13, 0x00) lsetup part b */ |
46 | 258 | RELOC_NUMBER (R_BFIN_GOT17M4, 0x14) |
47 | 356 | RELOC_NUMBER (R_BFIN_GOTHI, 0x15) |
48 | 251 | RELOC_NUMBER (R_BFIN_GOTLO, 0x16) |
49 | 408 | RELOC_NUMBER (R_BFIN_FUNCDESC, 0x17) |
50 | 391 | RELOC_NUMBER (R_BFIN_FUNCDESC_GOT17M4, 0x18) |
51 | 415 | RELOC_NUMBER (R_BFIN_FUNCDESC_GOTHI, 0x19) |
52 | 311 | RELOC_NUMBER (R_BFIN_FUNCDESC_GOTLO, 0x1a) |
53 | 263 | RELOC_NUMBER (R_BFIN_FUNCDESC_VALUE, 0x1b) |
54 | 238 | RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFF17M4, 0x1c) |
55 | 250 | RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFFHI, 0x1d) |
56 | 255 | RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFFLO, 0x1e) |
57 | 244 | RELOC_NUMBER (R_BFIN_GOTOFF17M4, 0x1f) |
58 | 574 | RELOC_NUMBER (R_BFIN_GOTOFFHI, 0x20) |
59 | 473 | RELOC_NUMBER (R_BFIN_GOTOFFLO, 0x21) |
60 | | |
61 | 276 | RELOC_NUMBER (R_BFIN_PUSH, 0xE0) |
62 | 290 | RELOC_NUMBER (R_BFIN_CONST, 0xE1) |
63 | 231 | RELOC_NUMBER (R_BFIN_ADD, 0xE2) |
64 | 251 | RELOC_NUMBER (R_BFIN_SUB, 0xE3) |
65 | 210 | RELOC_NUMBER (R_BFIN_MULT, 0xE4) |
66 | 385 | RELOC_NUMBER (R_BFIN_DIV, 0xE5) |
67 | 262 | RELOC_NUMBER (R_BFIN_MOD, 0xE6) |
68 | 434 | RELOC_NUMBER (R_BFIN_LSHIFT, 0xE7) |
69 | 319 | RELOC_NUMBER (R_BFIN_RSHIFT, 0xE8) |
70 | 297 | RELOC_NUMBER (R_BFIN_AND, 0xE9) |
71 | 233 | RELOC_NUMBER (R_BFIN_OR, 0xEA) |
72 | 248 | RELOC_NUMBER (R_BFIN_XOR, 0xEB) |
73 | 212 | RELOC_NUMBER (R_BFIN_LAND, 0xEC) |
74 | 234 | RELOC_NUMBER (R_BFIN_LOR, 0xED) |
75 | 240 | RELOC_NUMBER (R_BFIN_LEN, 0xEE) |
76 | 284 | RELOC_NUMBER (R_BFIN_NEG, 0xEF) |
77 | 283 | RELOC_NUMBER (R_BFIN_COMP, 0xF0) |
78 | 275 | RELOC_NUMBER (R_BFIN_PAGE, 0xF1) |
79 | 231 | RELOC_NUMBER (R_BFIN_HWPAGE, 0xF2) |
80 | 224 | RELOC_NUMBER (R_BFIN_ADDR, 0xF3) |
81 | 883 | RELOC_NUMBER (R_BFIN_PLTPC, 0x40) /* PLT gnu only relocation */ |
82 | 356 | RELOC_NUMBER (R_BFIN_GOT, 0x41) /* GOT gnu only relocation */ |
83 | 312 | RELOC_NUMBER (R_BFIN_GNU_VTINHERIT, 0x42) /* C++, gnu only */ |
84 | 650 | RELOC_NUMBER (R_BFIN_GNU_VTENTRY, 0x43) /* C++, gnu only */ |
85 | 16.8k | END_RELOC_NUMBERS (R_BFIN_max) |
86 | | |
87 | | /* Processor specific flags for the ELF header e_flags field. */ |
88 | 593 | #define EF_BFIN_PIC 0x00000001 /* -fpic */ |
89 | 3.68k | #define EF_BFIN_FDPIC 0x00000002 /* -mfdpic */ |
90 | | |
91 | 591 | #define EF_BFIN_CODE_IN_L1 0x00000010 /* --code-in-l1 */ |
92 | 591 | #define EF_BFIN_DATA_IN_L1 0x00000020 /* --data-in-l1 */ |
93 | | |
94 | | #define EF_BFIN_PIC_FLAGS (EF_BFIN_PIC | EF_BFIN_FDPIC) |
95 | | #endif /* _ELF_BFIN_H */ |