1 | /* Motorola MCore support for BFD. |
---|
2 | Copyright 1999, 2000, 2010 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 |
---|
18 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
---|
19 | MA 02110-1301, USA. */ |
---|
20 | |
---|
21 | /* This file holds definitions specific to the MCore COFF/PE ABI. */ |
---|
22 | |
---|
23 | #ifndef _COFF_MORE_H |
---|
24 | #define _COFF_MORE_H |
---|
25 | |
---|
26 | #define INCLUDE_COMDAT_FIELDS_IN_AUXENT |
---|
27 | #define L_LNNO_SIZE 2 |
---|
28 | #include "coff/external.h" |
---|
29 | |
---|
30 | #define MCOREMAGIC 0xb00 /* I just made this up */ |
---|
31 | |
---|
32 | #define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC)) |
---|
33 | |
---|
34 | #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ |
---|
35 | |
---|
36 | #define IMAGE_REL_MCORE_ABSOLUTE 0x0000 |
---|
37 | #define IMAGE_REL_MCORE_ADDR32 0x0001 |
---|
38 | #define IMAGE_REL_MCORE_PCREL_IMM8BY4 0x0002 |
---|
39 | #define IMAGE_REL_MCORE_PCREL_IMM11BY2 0x0003 |
---|
40 | #define IMAGE_REL_MCORE_PCREL_IMM4BY2 0x0004 |
---|
41 | #define IMAGE_REL_MCORE_PCREL_32 0x0005 |
---|
42 | #define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2 0x0006 |
---|
43 | #define IMAGE_REL_MCORE_RVA 0x0007 |
---|
44 | |
---|
45 | #define PEMCORE |
---|
46 | |
---|
47 | #define OMAGIC 0404 /* object files, eg as output */ |
---|
48 | #define ZMAGIC 0413 /* demand load format, eg normal ld output */ |
---|
49 | #define STMAGIC 0401 /* target shlib */ |
---|
50 | #define SHMAGIC 0443 /* host shlib */ |
---|
51 | |
---|
52 | /* From winnt.h */ |
---|
53 | #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b |
---|
54 | |
---|
55 | /* Define some NT default values. */ |
---|
56 | #define NT_SECTION_ALIGNMENT 0x1000 |
---|
57 | #define NT_FILE_ALIGNMENT 0x200 |
---|
58 | #define NT_DEF_RESERVE 0x100000 |
---|
59 | #define NT_DEF_COMMIT 0x1000 |
---|
60 | |
---|
61 | struct external_reloc |
---|
62 | { |
---|
63 | char r_vaddr [4]; |
---|
64 | char r_symndx [4]; |
---|
65 | char r_type [2]; |
---|
66 | char r_offset [4]; |
---|
67 | }; |
---|
68 | |
---|
69 | #define RELOC struct external_reloc |
---|
70 | #define RELSZ 14 |
---|
71 | |
---|
72 | #endif /* __COFF_MCORE_H */ |
---|