2006-05-01 Paul Brook <paul@codesourcery.com>
[binutils.git] / include / coff / m68k.h
blob4e88cea5a0207a85c0bcc6ef6742abe37aa06f98
1 /* coff information for M68K
3 Copyright 2001 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
19 #ifndef GNU_COFF_M68K_H
20 #define GNU_COFF_M68K_H 1
22 #define L_LNNO_SIZE 2
23 #include "coff/external.h"
25 /* Motorola 68000/68008/68010/68020 */
26 #define MC68MAGIC 0520
27 #define MC68KWRMAGIC 0520 /* writeable text segments */
28 #define MC68TVMAGIC 0521
29 #define MC68KROMAGIC 0521 /* readonly shareable text segments */
30 #define MC68KPGMAGIC 0522 /* demand paged text segments */
31 #define M68MAGIC 0210
32 #define M68TVMAGIC 0211
34 /* This is the magic of the Bull dpx/2 */
35 #define MC68KBCSMAGIC 0526
37 /* This is Lynx's all-platform magic number for executables. */
39 #define LYNXCOFFMAGIC 0415
41 #define OMAGIC M68MAGIC
43 /* This intentionally does not include MC68KBCSMAGIC; it only includes
44 magic numbers which imply that names do not have underscores. */
45 #define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
46 && ((x).f_magic != MC68KWRMAGIC) \
47 && ((x).f_magic != MC68TVMAGIC) \
48 && ((x).f_magic != MC68KROMAGIC) \
49 && ((x).f_magic != MC68KPGMAGIC) \
50 && ((x).f_magic != M68MAGIC) \
51 && ((x).f_magic != M68TVMAGIC) \
52 && ((x).f_magic != LYNXCOFFMAGIC))
54 /* Magic numbers for the a.out header. */
56 #define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */
57 #define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
58 #define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
59 #define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
61 /********************** RELOCATION DIRECTIVES **********************/
63 struct external_reloc
65 char r_vaddr[4];
66 char r_symndx[4];
67 char r_type[2];
68 #ifdef M68K_COFF_OFFSET
69 char r_offset[4];
70 #endif
73 #define RELOC struct external_reloc
75 #ifdef M68K_COFF_OFFSET
76 #define RELSZ 14
77 #else
78 #define RELSZ 10
79 #endif
81 #endif /* GNU_COFF_M68K_H */