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