OSDN Git Service

* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
[pf3gnuchains/pf3gnuchains3x.git] / include / coff / m68k.h
1 /* coff information for M68K
2    
3    Copyright 2001 Free Software Foundation, Inc.
4
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.
9    
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.
14    
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.  */
18
19 #ifndef GNU_COFF_M68K_H
20 #define GNU_COFF_M68K_H 1
21
22 #define L_LNNO_SIZE 2
23 #include "coff/external.h"
24
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
33
34 /* This is the magic of the Bull dpx/2 */
35 #define MC68KBCSMAGIC   0526
36
37 /* This is Lynx's all-platform magic number for executables. */
38
39 #define LYNXCOFFMAGIC   0415
40
41 #define OMAGIC M68MAGIC
42
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))
53
54 /* Magic numbers for the a.out header.  */
55
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) */
60
61 /********************** RELOCATION DIRECTIVES **********************/
62
63 struct external_reloc
64 {
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
71 };
72
73 #define RELOC struct external_reloc
74
75 #ifdef M68K_COFF_OFFSET
76 #define RELSZ 14
77 #else
78 #define RELSZ 10
79 #endif
80
81 #endif /* GNU_COFF_M68K_H */