1 |
38 |
julius |
/* Toshiba MeP ELF support for BFD.
|
2 |
|
|
Copyright (C) 2001, 2004, 2005 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 2 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, Inc.,
|
18 |
|
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
19 |
|
|
|
20 |
|
|
#ifndef _ELF_MEP_H
|
21 |
|
|
#define _ELF_MEP_H
|
22 |
|
|
|
23 |
|
|
/* Bits in the sh_flags field of Elf32_Shdr: */
|
24 |
|
|
|
25 |
|
|
#define SHF_MEP_VLIW 0x10000000 /* contains vliw code */
|
26 |
|
|
|
27 |
|
|
/* This bit is reserved by BFD for processor specific stuff. Name
|
28 |
|
|
it properly so that we can easily stay consistent elsewhere. */
|
29 |
|
|
#define SEC_MEP_VLIW SEC_TIC54X_BLOCK
|
30 |
|
|
|
31 |
|
|
#include "elf/reloc-macros.h"
|
32 |
|
|
|
33 |
|
|
/* Note: The comments in this file are used by bfd/mep-relocs.pl to
|
34 |
|
|
build parts of bfd/elf32-mep.c. */
|
35 |
|
|
|
36 |
|
|
/* Relocations. */
|
37 |
|
|
START_RELOC_NUMBERS (elf_mep_reloc_type)
|
38 |
|
|
|
39 |
|
|
/* These two must appear first so that they are not processed by bfd/mep-relocs.pl. */
|
40 |
|
|
RELOC_NUMBER (R_MEP_NONE, 0)
|
41 |
|
|
RELOC_NUMBER (R_RELC, 1)
|
42 |
|
|
|
43 |
|
|
RELOC_NUMBER (R_MEP_8, 2) /* 7654 3210 U */
|
44 |
|
|
RELOC_NUMBER (R_MEP_16, 3) /* fedc ba98 7654 3210 U */
|
45 |
|
|
RELOC_NUMBER (R_MEP_32, 4) /* vuts rqpo nmlk jihg fedc ba98 7654 3210 U */
|
46 |
|
|
|
47 |
|
|
RELOC_NUMBER (R_MEP_PCREL8A2, 5) /* ---- ---- 7654 321- S PC-REL */
|
48 |
|
|
RELOC_NUMBER (R_MEP_PCREL12A2, 6) /* ---- ba98 7654 321- S PC-REL */
|
49 |
|
|
RELOC_NUMBER (R_MEP_PCREL17A2, 7) /* ---- ---- ---- ---- gfed cba9 8765 4321 S PC-REL */
|
50 |
|
|
RELOC_NUMBER (R_MEP_PCREL24A2, 8) /* ---- -765 4321 ---- nmlk jihg fedc ba98 S PC-REL */
|
51 |
|
|
RELOC_NUMBER (R_MEP_PCABS24A2, 9) /* ---- -765 4321 ---- nmlk jihg fedc ba98 U */
|
52 |
|
|
|
53 |
|
|
RELOC_NUMBER (R_MEP_LOW16, 10) /* ---- ---- ---- ---- fedc ba98 7654 3210 U no-overflow */
|
54 |
|
|
RELOC_NUMBER (R_MEP_HI16U, 11) /* ---- ---- ---- ---- vuts rqpo nmlk jihg U no-overflow */
|
55 |
|
|
RELOC_NUMBER (R_MEP_HI16S, 12) /* ---- ---- ---- ---- vuts rqpo nmlk jihg S no-overflow */
|
56 |
|
|
RELOC_NUMBER (R_MEP_GPREL, 13) /* ---- ---- ---- ---- fedc ba98 7654 3210 S GP-REL*/
|
57 |
|
|
RELOC_NUMBER (R_MEP_TPREL, 14) /* ---- ---- ---- ---- fedc ba98 7654 3210 S TP-REL*/
|
58 |
|
|
|
59 |
|
|
RELOC_NUMBER (R_MEP_TPREL7, 15) /* ---- ---- -654 3210 U TP-REL */
|
60 |
|
|
RELOC_NUMBER (R_MEP_TPREL7A2, 16) /* ---- ---- -654 321- U TP-REL */
|
61 |
|
|
RELOC_NUMBER (R_MEP_TPREL7A4, 17) /* ---- ---- -654 32-- U TP-REL */
|
62 |
|
|
|
63 |
|
|
RELOC_NUMBER (R_MEP_UIMM24, 18) /* ---- ---- 7654 3210 nmlk jihg fedc ba98 U */
|
64 |
|
|
RELOC_NUMBER (R_MEP_ADDR24A4, 19) /* ---- ---- 7654 32-- nmlk jihg fedc ba98 U */
|
65 |
|
|
|
66 |
|
|
RELOC_NUMBER (R_MEP_GNU_VTINHERIT, 20) /* ---- ---- ---- ---- U no-overflow */
|
67 |
|
|
RELOC_NUMBER (R_MEP_GNU_VTENTRY, 21) /* ---- ---- ---- ---- U no-overflow */
|
68 |
|
|
|
69 |
|
|
END_RELOC_NUMBERS(R_MEP_max)
|
70 |
|
|
|
71 |
|
|
#define EF_MEP_CPU_MASK 0xff000000 /* specific cpu bits */
|
72 |
|
|
#define EF_MEP_CPU_MEP 0x00000000 /* generic MEP */
|
73 |
|
|
#define EF_MEP_CPU_C2 0x01000000 /* MEP c2 */
|
74 |
|
|
#define EF_MEP_CPU_C3 0x02000000 /* MEP c3 */
|
75 |
|
|
#define EF_MEP_CPU_C4 0x04000000 /* MEP c4 */
|
76 |
|
|
#define EF_MEP_CPU_H1 0x10000000 /* MEP h1 */
|
77 |
|
|
|
78 |
|
|
#define EF_MEP_LIBRARY 0x00000100 /* Built as a library */
|
79 |
|
|
|
80 |
|
|
#define EF_MEP_INDEX_MASK 0x000000ff /* Configuration index */
|
81 |
|
|
|
82 |
|
|
#define EF_MEP_ALL_FLAGS 0xff0001ff
|
83 |
|
|
|
84 |
|
|
#endif /* _ELF_MEP_H */
|