Back to index

cell-binutils  2.17cvs20070401
hp.h
Go to the documentation of this file.
00001 /* Special version of <a.out.h> for use under hp-ux.
00002    Copyright 1988, 1991 Free Software Foundation, Inc.
00003 
00004 This program is free software; you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation; either version 2 of the License, or
00007 (at your option) any later version.
00008 
00009 This program is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with this program; if not, write to the Free Software
00016 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00017 
00018 /* THIS FILE IS OBSOLETE.  It needs to be revised as a variant "external"
00019    a.out format for use with BFD.  */
00020 
00021 /* The `exec' structure and overall layout must be close to HP's when
00022    we are running on an HP system, otherwise we will not be able to
00023    execute the resulting file. */
00024 
00025 /* Allow this file to be included twice. */
00026 #ifndef __GNU_EXEC_MACROS__
00027 
00028 struct exec
00029 {
00030   unsigned short a_machtype;       /* machine type */
00031   unsigned short a_magic;   /* magic number */
00032   unsigned long a_spare1;
00033   unsigned long a_spare2;
00034   unsigned long a_text;            /* length of text, in bytes */
00035   unsigned long a_data;            /* length of data, in bytes */
00036   unsigned long a_bss;             /* length of uninitialized data area for file, in bytes */
00037   unsigned long a_trsize;   /* length of relocation info for text, in bytes */
00038   unsigned long a_drsize;   /* length of relocation info for data, in bytes */
00039   unsigned long a_spare3;   /* HP = pascal interface size */
00040   unsigned long a_spare4;   /* HP = symbol table size */
00041   unsigned long a_spare5;   /* HP = debug name table size */
00042   unsigned long a_entry;    /* start address */
00043   unsigned long a_spare6;   /* HP = source line table size */
00044   unsigned long a_spare7;   /* HP = value table size */
00045   unsigned long a_syms;            /* length of symbol table data in file, in bytes */
00046   unsigned long a_spare8;
00047 };
00048 
00049 /* Tell a.out.gnu.h not to define `struct exec'.  */
00050 #define __STRUCT_EXEC_OVERRIDE__
00051 
00052 #include "../a.out.gnu.h"
00053 
00054 #undef N_MAGIC
00055 #undef N_MACHTYPE
00056 #undef N_FLAGS
00057 #undef N_SET_INFO
00058 #undef N_SET_MAGIC
00059 #undef N_SET_MACHTYPE
00060 #undef N_SET_FLAGS
00061 
00062 #define N_MAGIC(exec) ((exec) . a_magic)
00063 #define N_MACHTYPE(exec) ((exec) . a_machtype)
00064 #define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
00065 #define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
00066 
00067 #undef N_BADMAG
00068 #define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
00069 
00070 #define _N_BADMACH(x)                                                 \
00071 (((N_MACHTYPE (x)) != HP9000S200_ID) &&                               \
00072  ((N_MACHTYPE (x)) != HP98x6_ID))
00073 
00074 #define HP98x6_ID 0x20A
00075 #define HP9000S200_ID 0x20C
00076 
00077 #undef _N_HDROFF
00078 #define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
00079 
00080 #define SEGMENT_SIZE 0x1000
00081 
00082 #endif /* __GNU_EXEC_MACROS__ */