1 /* Special version of <a.out.h> for use under hp-ux.
2 Copyright (C) 1988, 1992 Free Software Foundation, Inc.
4 This file 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, or (at your option)
9 This file 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 file; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20 #define HP9000S200_ID (0x20C)
21 #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (HP9000S200_ID)
23 /* hpux has "special" headers. */
24 #define H_GET_HEADER_SIZE(h) (64)
26 #include "obj-format.h"
28 /* This stuff is from an old a.out.hpux.h. It isn't used anymore,
29 (see obj-aout.c, obj_header_append) but I'm including it here for
34 /* The `exec' structure and overall layout must be close to HP's when
35 we are running on an HP system, otherwise we will not be able to
36 execute the resulting file. */
38 /* Allow this file to be included twice. */
39 #ifndef __GNU_EXEC_MACROS__
43 unsigned short a_machtype; /* machine type */
44 unsigned short a_info; /* magic number */
45 unsigned long a_spare1;
46 unsigned long a_spare2;
47 unsigned long a_text; /* length of text, in bytes */
48 unsigned long a_data; /* length of data, in bytes */
49 unsigned long a_bss; /* length of uninitialized data area for file, in bytes */
50 unsigned long a_trsize; /* length of relocation info for text, in bytes */
51 unsigned long a_drsize; /* length of relocation info for data, in bytes */
52 unsigned long a_spare3; /* HP = pascal interface size */
53 unsigned long a_spare4; /* HP = symbol table size */
54 unsigned long a_spare5; /* HP = debug name table size */
55 unsigned long a_entry; /* start address */
56 unsigned long a_spare6; /* HP = source line table size */
57 unsigned long a_spare7; /* HP = value table size */
58 unsigned long a_syms; /* length of symbol table data in file, in bytes */
59 unsigned long a_spare8;
62 /* Tell a.out.gnu.h not to define `struct exec'. */
63 #define __STRUCT_EXEC_OVERRIDE__
65 #include "a.out.gnu.h"
75 #define N_MAGIC(exec) ((exec) . a_magic)
76 #define N_MACHTYPE(exec) ((exec) . a_machtype)
77 #define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
78 #define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
81 #define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
83 #define _N_BADMACH(x) \
84 (((N_MACHTYPE (x)) != HP9000S200_ID) && \
85 ((N_MACHTYPE (x)) != HP98x6_ID))
87 #define HP98x6_ID 0x20A
88 #define HP9000S200_ID 0x20C
91 #define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
93 #define SEGMENT_SIZE 0x1000
95 #endif /* __GNU_EXEC_MACROS__ */
99 /* end of te-hpux.h */