1 /* Special version of <a.out.h> for use under hp-ux.
2 Copyright 1988, 1991 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18 /* THIS FILE IS OBSOLETE. It needs to be revised as a variant "external"
19 a.out format for use with BFD. */
21 /* The `exec' structure and overall layout must be close to HP's when
22 we are running on an HP system, otherwise we will not be able to
23 execute the resulting file. */
25 /* Allow this file to be included twice. */
26 #ifndef __GNU_EXEC_MACROS__
30 unsigned short a_machtype; /* machine type */
31 unsigned short a_magic; /* magic number */
32 unsigned long a_spare1;
33 unsigned long a_spare2;
34 unsigned long a_text; /* length of text, in bytes */
35 unsigned long a_data; /* length of data, in bytes */
36 unsigned long a_bss; /* length of uninitialized data area for file, in bytes */
37 unsigned long a_trsize; /* length of relocation info for text, in bytes */
38 unsigned long a_drsize; /* length of relocation info for data, in bytes */
39 unsigned long a_spare3; /* HP = pascal interface size */
40 unsigned long a_spare4; /* HP = symbol table size */
41 unsigned long a_spare5; /* HP = debug name table size */
42 unsigned long a_entry; /* start address */
43 unsigned long a_spare6; /* HP = source line table size */
44 unsigned long a_spare7; /* HP = value table size */
45 unsigned long a_syms; /* length of symbol table data in file, in bytes */
46 unsigned long a_spare8;
49 /* Tell a.out.gnu.h not to define `struct exec'. */
50 #define __STRUCT_EXEC_OVERRIDE__
52 #include "../a.out.gnu.h"
62 #define N_MAGIC(exec) ((exec) . a_magic)
63 #define N_MACHTYPE(exec) ((exec) . a_machtype)
64 #define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
65 #define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
68 #define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
70 #define _N_BADMACH(x) \
71 (((N_MACHTYPE (x)) != HP9000S200_ID) && \
72 ((N_MACHTYPE (x)) != HP98x6_ID))
74 #define HP98x6_ID 0x20A
75 #define HP9000S200_ID 0x20C
78 #define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
80 #define SEGMENT_SIZE 0x1000
82 #endif /* __GNU_EXEC_MACROS__ */