summaryrefslogtreecommitdiff
path: root/include/coff/m68k.h
blob: 5c5f758f50dbf3086052868664a755bf3408ad1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* coff information for M68K
   
   Copyright 2001 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifndef GNU_COFF_M68K_H
#define GNU_COFF_M68K_H 1

#define L_LNNO_SIZE 2
#include "coff/external.h"

/* Motorola 68000/68008/68010/68020 */
#define	MC68MAGIC	0520
#define MC68KWRMAGIC	0520	/* writeable text segments */
#define	MC68TVMAGIC	0521
#define MC68KROMAGIC	0521	/* readonly shareable text segments */
#define MC68KPGMAGIC	0522	/* demand paged text segments */
#define	M68MAGIC	0210
#define	M68TVMAGIC	0211

/* This is the magic of the Bull dpx/2 */
#define MC68KBCSMAGIC	0526

/* This is Lynx's all-platform magic number for executables. */

#define LYNXCOFFMAGIC	0415

#define OMAGIC M68MAGIC

/* This intentionally does not include MC68KBCSMAGIC; it only includes
   magic numbers which imply that names do not have underscores.  */
#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
                    && ((x).f_magic != MC68KWRMAGIC) \
                    && ((x).f_magic != MC68TVMAGIC) \
                    && ((x).f_magic != MC68KROMAGIC) \
                    && ((x).f_magic != MC68KPGMAGIC) \
                    && ((x).f_magic != M68MAGIC) \
                    && ((x).f_magic != M68TVMAGIC) \
                    && ((x).f_magic != LYNXCOFFMAGIC))

/* Magic numbers for the a.out header.  */

#define PAGEMAGICEXECSWAPPED  0407 /* executable (swapped) */
#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
#define PAGEMAGICPEXECTSHLIB  0443 /* pure executable (target shared library) */
#define PAGEMAGICPEXECPAGED   0413 /* pure executable (paged) */

/********************** RELOCATION DIRECTIVES **********************/

struct external_reloc
{
  char r_vaddr[4];
  char r_symndx[4];
  char r_type[2];
#ifdef M68K_COFF_OFFSET
  char r_offset[4];
#endif
};

#define RELOC struct external_reloc

#ifdef M68K_COFF_OFFSET
#define RELSZ 14
#else
#define RELSZ 10
#endif

#endif /* GNU_COFF_M68K_H */