]> Git Repo - binutils.git/blob - include/a.out.hp.h
* aoutf1.h (sunos4_core_file_p): Release the right storage in error case.
[binutils.git] / include / a.out.hp.h
1 /* Special version of <a.out.h> for use under hp-ux.
2    Copyright (C) 1988 Free Software Foundation, Inc.
3
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.
8
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.
13
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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
17
18 /* The `exec' structure and overall layout must be close to HP's when
19    we are running on an HP system, otherwise we will not be able to
20    execute the resulting file. */
21
22 /* Allow this file to be included twice. */
23 #ifndef __GNU_EXEC_MACROS__
24
25 struct exec
26 {
27   unsigned short a_machtype;    /* machine type */
28   unsigned short a_magic;       /* magic number */
29   unsigned long a_spare1;
30   unsigned long a_spare2;
31   unsigned long a_text;         /* length of text, in bytes */
32   unsigned long a_data;         /* length of data, in bytes */
33   unsigned long a_bss;          /* length of uninitialized data area for file, in bytes */
34   unsigned long a_trsize;       /* length of relocation info for text, in bytes */
35   unsigned long a_drsize;       /* length of relocation info for data, in bytes */
36   unsigned long a_spare3;       /* HP = pascal interface size */
37   unsigned long a_spare4;       /* HP = symbol table size */
38   unsigned long a_spare5;       /* HP = debug name table size */
39   unsigned long a_entry;        /* start address */
40   unsigned long a_spare6;       /* HP = source line table size */
41   unsigned long a_spare7;       /* HP = value table size */
42   unsigned long a_syms;         /* length of symbol table data in file, in bytes */
43   unsigned long a_spare8;
44 };
45
46 /* Tell a.out.gnu.h not to define `struct exec'.  */
47 #define __STRUCT_EXEC_OVERRIDE__
48
49 #include "../a.out.gnu.h"
50
51 #undef N_MAGIC
52 #undef N_MACHTYPE
53 #undef N_FLAGS
54 #undef N_SET_INFO
55 #undef N_SET_MAGIC
56 #undef N_SET_MACHTYPE
57 #undef N_SET_FLAGS
58
59 #define N_MAGIC(exec) ((exec) . a_magic)
60 #define N_MACHTYPE(exec) ((exec) . a_machtype)
61 #define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
62 #define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
63
64 #undef N_BADMAG
65 #define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
66
67 #define _N_BADMACH(x)                                                   \
68 (((N_MACHTYPE (x)) != HP9000S200_ID) &&                                 \
69  ((N_MACHTYPE (x)) != HP98x6_ID))
70
71 #define HP98x6_ID 0x20A
72 #define HP9000S200_ID 0x20C
73
74 #undef _N_HDROFF
75 #define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
76
77 #define SEGMENT_SIZE 0x1000
78
79 #endif /* __GNU_EXEC_MACROS__ */
This page took 0.029278 seconds and 4 git commands to generate.