1 |
/* M32R ELF support for BFD. |
/* M32R ELF support for BFD. |
2 |
Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
Copyright 1996, 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of BFD, the Binary File Descriptor library. |
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 |
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 |
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 |
the Free Software Foundation; either version 2 of the License, or |
9 |
(at your option) any later version. |
(at your option) any later version. |
10 |
|
|
11 |
This program is distributed in the hope that it will be useful, |
This program is distributed in the hope that it will be useful, |
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
GNU General Public License for more details. |
GNU General Public License for more details. |
15 |
|
|
16 |
You should have received a copy of the GNU General Public License |
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., |
along with this program; if not, write to the Free Software Foundation, Inc., |
18 |
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
19 |
|
|
20 |
#ifndef _ELF_M32R_H |
#ifndef _ELF_M32R_H |
21 |
#define _ELF_M32R_H |
#define _ELF_M32R_H |
25 |
/* Relocations. */ |
/* Relocations. */ |
26 |
START_RELOC_NUMBERS (elf_m32r_reloc_type) |
START_RELOC_NUMBERS (elf_m32r_reloc_type) |
27 |
RELOC_NUMBER (R_M32R_NONE, 0) |
RELOC_NUMBER (R_M32R_NONE, 0) |
28 |
RELOC_NUMBER (R_M32R_16, 1) |
/* REL relocations */ |
29 |
RELOC_NUMBER (R_M32R_32, 2) |
RELOC_NUMBER (R_M32R_16, 1) /* For backwards compatibility. */ |
30 |
RELOC_NUMBER (R_M32R_24, 3) |
RELOC_NUMBER (R_M32R_32, 2) /* For backwards compatibility. */ |
31 |
RELOC_NUMBER (R_M32R_10_PCREL, 4) |
RELOC_NUMBER (R_M32R_24, 3) /* For backwards compatibility. */ |
32 |
RELOC_NUMBER (R_M32R_18_PCREL, 5) |
RELOC_NUMBER (R_M32R_10_PCREL, 4) /* For backwards compatibility. */ |
33 |
RELOC_NUMBER (R_M32R_26_PCREL, 6) |
RELOC_NUMBER (R_M32R_18_PCREL, 5) /* For backwards compatibility. */ |
34 |
RELOC_NUMBER (R_M32R_HI16_ULO, 7) |
RELOC_NUMBER (R_M32R_26_PCREL, 6) /* For backwards compatibility. */ |
35 |
RELOC_NUMBER (R_M32R_HI16_SLO, 8) |
RELOC_NUMBER (R_M32R_HI16_ULO, 7) /* For backwards compatibility. */ |
36 |
RELOC_NUMBER (R_M32R_LO16, 9) |
RELOC_NUMBER (R_M32R_HI16_SLO, 8) /* For backwards compatibility. */ |
37 |
RELOC_NUMBER (R_M32R_SDA16, 10) |
RELOC_NUMBER (R_M32R_LO16, 9) /* For backwards compatibility. */ |
38 |
RELOC_NUMBER (R_M32R_GNU_VTINHERIT, 11) |
RELOC_NUMBER (R_M32R_SDA16, 10) /* For backwards compatibility. */ |
39 |
RELOC_NUMBER (R_M32R_GNU_VTENTRY, 12) |
RELOC_NUMBER (R_M32R_GNU_VTINHERIT, 11)/* For backwards compatibility. */ |
40 |
|
RELOC_NUMBER (R_M32R_GNU_VTENTRY, 12) /* For backwards compatibility. */ |
41 |
|
|
42 |
|
/* RELA relocations */ |
43 |
|
RELOC_NUMBER (R_M32R_16_RELA, 33) |
44 |
|
RELOC_NUMBER (R_M32R_32_RELA, 34) |
45 |
|
RELOC_NUMBER (R_M32R_24_RELA, 35) |
46 |
|
RELOC_NUMBER (R_M32R_10_PCREL_RELA, 36) |
47 |
|
RELOC_NUMBER (R_M32R_18_PCREL_RELA, 37) |
48 |
|
RELOC_NUMBER (R_M32R_26_PCREL_RELA, 38) |
49 |
|
RELOC_NUMBER (R_M32R_HI16_ULO_RELA, 39) |
50 |
|
RELOC_NUMBER (R_M32R_HI16_SLO_RELA, 40) |
51 |
|
RELOC_NUMBER (R_M32R_LO16_RELA, 41) |
52 |
|
RELOC_NUMBER (R_M32R_SDA16_RELA, 42) |
53 |
|
RELOC_NUMBER (R_M32R_RELA_GNU_VTINHERIT, 43) |
54 |
|
RELOC_NUMBER (R_M32R_RELA_GNU_VTENTRY, 44) |
55 |
|
|
56 |
|
RELOC_NUMBER (R_M32R_GOT24, 48) |
57 |
|
RELOC_NUMBER (R_M32R_26_PLTREL, 49) |
58 |
|
RELOC_NUMBER (R_M32R_COPY, 50) |
59 |
|
RELOC_NUMBER (R_M32R_GLOB_DAT, 51) |
60 |
|
RELOC_NUMBER (R_M32R_JMP_SLOT, 52) |
61 |
|
RELOC_NUMBER (R_M32R_RELATIVE, 53) |
62 |
|
RELOC_NUMBER (R_M32R_GOTOFF, 54) |
63 |
|
RELOC_NUMBER (R_M32R_GOTPC24, 55) |
64 |
|
RELOC_NUMBER (R_M32R_GOT16_HI_ULO, 56) |
65 |
|
RELOC_NUMBER (R_M32R_GOT16_HI_SLO, 57) |
66 |
|
RELOC_NUMBER (R_M32R_GOT16_LO, 58) |
67 |
|
RELOC_NUMBER (R_M32R_GOTPC_HI_ULO, 59) |
68 |
|
RELOC_NUMBER (R_M32R_GOTPC_HI_SLO, 60) |
69 |
|
RELOC_NUMBER (R_M32R_GOTPC_LO, 61) |
70 |
|
RELOC_NUMBER (R_M32R_GOTOFF_HI_ULO, 62) |
71 |
|
RELOC_NUMBER (R_M32R_GOTOFF_HI_SLO, 63) |
72 |
|
RELOC_NUMBER (R_M32R_GOTOFF_LO, 64) |
73 |
END_RELOC_NUMBERS (R_M32R_max) |
END_RELOC_NUMBERS (R_M32R_max) |
74 |
|
|
75 |
/* Processor specific section indices. These sections do not actually |
/* Processor specific section indices. These sections do not actually |
95 |
/* m32r code. */ |
/* m32r code. */ |
96 |
#define E_M32R_ARCH 0x00000000 |
#define E_M32R_ARCH 0x00000000 |
97 |
/* m32rx code. */ |
/* m32rx code. */ |
98 |
#define E_M32RX_ARCH 0x10000000 |
#define E_M32RX_ARCH 0x10000000 |
99 |
|
/* m32r2 code. */ |
100 |
|
#define E_M32R2_ARCH 0x20000000 |
101 |
|
|
102 |
|
/* 12 bit m32r new instructions field. */ |
103 |
|
#define EF_M32R_INST 0x0FFF0000 |
104 |
|
/* Parallel instructions. */ |
105 |
|
#define E_M32R_HAS_PARALLEL 0x00010000 |
106 |
|
/* Hidden instructions for m32rx: |
107 |
|
jc, jnc, macwhi-a, macwlo-a, mulwhi-a, mulwlo-a, sth+, shb+, sat, pcmpbz, |
108 |
|
sc, snc. */ |
109 |
|
#define E_M32R_HAS_HIDDEN_INST 0x00020000 |
110 |
|
/* New bit instructions: |
111 |
|
clrpsw, setpsw, bset, bclr, btst. */ |
112 |
|
#define E_M32R_HAS_BIT_INST 0x00040000 |
113 |
|
/* Floating point instructions. */ |
114 |
|
#define E_M32R_HAS_FLOAT_INST 0x00080000 |
115 |
|
|
116 |
|
/* 4 bit m32r ignore to check field. */ |
117 |
|
#define EF_M32R_IGNORE 0x0000000F |
118 |
|
|
119 |
#endif |
#endif |