some pmax updating (Terry Friedrichsen is helping on this now).
This commit is contained in:
parent
540438e596
commit
9fd56d82c3
@ -31,118 +31,26 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)exec.h 7.2 (Berkeley) 9/13/92
|
||||
* $Id: aout_machdep.h,v 1.1.1.1 1993/10/12 03:22:41 deraadt Exp $
|
||||
* $Id: aout_machdep.h,v 1.2 1994/01/14 04:53:38 deraadt Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions of this file are subject to the following copyright notice:
|
||||
*
|
||||
* Copyright (C) 1989 Digital Equipment Corporation.
|
||||
* Permission to use, copy, modify, and distribute this software and
|
||||
* its documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appears in all copies.
|
||||
* Digital Equipment Corporation makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
#ifndef _PMAX_EXEC_H_
|
||||
#define _PMAX_EXEC_H_
|
||||
|
||||
/*
|
||||
* /sprite/src/kernel/proc/ds3100.md/RCS/procMach.h,v 9.3 90/02/20 15:35:50
|
||||
* shirriff Exp $ SPRITE (Berkeley)
|
||||
*/
|
||||
|
||||
/* Size of a page in an object file. */
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
/* Valid magic number check. */
|
||||
#define N_BADMAG(ex) \
|
||||
((ex).a_magic != NMAGIC && (ex).a_magic != OMAGIC && \
|
||||
(ex).a_magic != ZMAGIC)
|
||||
|
||||
/* Address of the bottom of the text segment. */
|
||||
#define N_TXTADDR(ex) 0x400000
|
||||
|
||||
/* Address of the bottom of the data segment. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/* Text segment offset. */
|
||||
#define __N_TXTOFF_ROUND(ex) \
|
||||
((ex).ex_aout.verStamp < 23 ? 7 : 15)
|
||||
#define N_TXTOFF(ex) \
|
||||
((ex).ex_aout.magic == ZMAGIC ? 0 : (sizeof(struct exec) + \
|
||||
(ex).ex_fhdr.numSections * sizeof(ProcSectionHeader) + \
|
||||
__N_TXTOFF_ROUND(ex)) & ~__N_TXTOFF_ROUND(ex))
|
||||
|
||||
/* Data segment offset. */
|
||||
#define N_DATOFF(ex) \
|
||||
(N_TXTOFF(ex) + (ex).ex_aout.codeSize)
|
||||
|
||||
/* Symbol table offset. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/* String table offset. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* The ProcFileHeader structure and the ProcAOUTHeader structure should be
|
||||
* folded together into a single struct exec.
|
||||
*/
|
||||
|
||||
/* Description of the COFF section. */
|
||||
typedef struct {
|
||||
#define COFF_MAGIC 0x0162
|
||||
u_short magic; /* The magic number. */
|
||||
|
||||
u_short numSections; /* The number of sections. */
|
||||
long timeDateStamp; /* Time and date stamp. */
|
||||
long symPtr; /* File pointer to symbolic header. */
|
||||
long numSyms; /* Size of symbolic header. */
|
||||
u_short optHeader; /* Size of optional header. */
|
||||
u_short flags; /* Flags. */
|
||||
} ProcFileHeader;
|
||||
|
||||
/* Description of the a.out section. */
|
||||
typedef struct {
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
short magic; /* Magic number. */
|
||||
|
||||
short verStamp; /* Version stamp. */
|
||||
long codeSize; /* Code size in bytes. */
|
||||
long heapSize; /* Initialized data size in bytes. */
|
||||
long bssSize; /* Uninitialized data size in bytes. */
|
||||
long entry; /* Entry point. */
|
||||
long codeStart; /* Base of code used for this file. */
|
||||
long heapStart; /* Base of heap used for this file. */
|
||||
long bssStart; /* Base of bss used for this file. */
|
||||
long gprMask; /* General purpose register mask. */
|
||||
long cprMask[4]; /* Co-processor register masks. */
|
||||
long gpValue; /* The gp value for this object. */
|
||||
} ProcAOUTHeader;
|
||||
|
||||
/* Section header. */
|
||||
typedef struct {
|
||||
char name[8]; /* Section name. */
|
||||
long physAddr; /* Section physical address. */
|
||||
long virtAddr; /* Section virtual address. */
|
||||
long size; /* Section size. */
|
||||
long sectionPtr; /* File pointer to section data. */
|
||||
long relocPtr; /* File pointer to relocation data. */
|
||||
long lnnoPtr; /* File pointer to gp tables. */
|
||||
u_short numReloc; /* Number of relocation entries. */
|
||||
u_short numLnno; /* Numberof gp tables. */
|
||||
long flags; /* Section flags. */
|
||||
} ProcSectionHeader;
|
||||
|
||||
/* Description of the object file header. */
|
||||
struct exec {
|
||||
ProcFileHeader ex_fhdr;
|
||||
ProcAOUTHeader ex_aout;
|
||||
/* Relocation format. */
|
||||
struct relocation_info_pmax {
|
||||
int r_address; /* offset in text or data segment */
|
||||
unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
|
||||
r_pcrel : 1, /* 1 if value should be pc-relative */
|
||||
r_length : 2, /* log base 2 of value's width */
|
||||
r_extern : 1, /* 1 if need to add symbol to value */
|
||||
r_baserel : 1, /* linkage table relative */
|
||||
r_jmptable : 1, /* relocate to jump table */
|
||||
r_relative : 1, /* load address relative */
|
||||
r_copy : 1; /* run time copy */
|
||||
};
|
||||
#define a_magic ex_aout.magic
|
||||
#define a_text ex_aout.codeSize
|
||||
#define a_data ex_aout.heapSize
|
||||
#define a_bss ex_aout.bssSize
|
||||
#define a_entry ex_aout.entry
|
||||
#define relocation_info relocation_info_pmax
|
||||
|
||||
#define __LDPGSZ 4096 /* linker page size */
|
||||
|
||||
#endif /* !_MACHINE_EXEC_H_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cpu.h 7.7 (Berkeley) 11/15/92
|
||||
* $Id: cpu.h,v 1.2 1993/10/15 02:57:11 deraadt Exp $
|
||||
* $Id: cpu.h,v 1.3 1994/01/14 04:53:37 deraadt Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CPU_H_
|
||||
@ -134,10 +134,8 @@ union cpuprid {
|
||||
#define MIPS_R4010 0x05
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef notdef
|
||||
union cpuprid cpu;
|
||||
union cpuprid fpu;
|
||||
#endif
|
||||
u_int machDataCacheSize;
|
||||
u_int machInstCacheSize;
|
||||
extern struct intr_tab intr_tab[];
|
||||
|
@ -31,118 +31,26 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)exec.h 7.2 (Berkeley) 9/13/92
|
||||
* $Id: exec.h,v 1.1.1.1 1993/10/12 03:22:41 deraadt Exp $
|
||||
* $Id: exec.h,v 1.2 1994/01/14 04:53:38 deraadt Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions of this file are subject to the following copyright notice:
|
||||
*
|
||||
* Copyright (C) 1989 Digital Equipment Corporation.
|
||||
* Permission to use, copy, modify, and distribute this software and
|
||||
* its documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appears in all copies.
|
||||
* Digital Equipment Corporation makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
#ifndef _PMAX_EXEC_H_
|
||||
#define _PMAX_EXEC_H_
|
||||
|
||||
/*
|
||||
* /sprite/src/kernel/proc/ds3100.md/RCS/procMach.h,v 9.3 90/02/20 15:35:50
|
||||
* shirriff Exp $ SPRITE (Berkeley)
|
||||
*/
|
||||
|
||||
/* Size of a page in an object file. */
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
/* Valid magic number check. */
|
||||
#define N_BADMAG(ex) \
|
||||
((ex).a_magic != NMAGIC && (ex).a_magic != OMAGIC && \
|
||||
(ex).a_magic != ZMAGIC)
|
||||
|
||||
/* Address of the bottom of the text segment. */
|
||||
#define N_TXTADDR(ex) 0x400000
|
||||
|
||||
/* Address of the bottom of the data segment. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/* Text segment offset. */
|
||||
#define __N_TXTOFF_ROUND(ex) \
|
||||
((ex).ex_aout.verStamp < 23 ? 7 : 15)
|
||||
#define N_TXTOFF(ex) \
|
||||
((ex).ex_aout.magic == ZMAGIC ? 0 : (sizeof(struct exec) + \
|
||||
(ex).ex_fhdr.numSections * sizeof(ProcSectionHeader) + \
|
||||
__N_TXTOFF_ROUND(ex)) & ~__N_TXTOFF_ROUND(ex))
|
||||
|
||||
/* Data segment offset. */
|
||||
#define N_DATOFF(ex) \
|
||||
(N_TXTOFF(ex) + (ex).ex_aout.codeSize)
|
||||
|
||||
/* Symbol table offset. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/* String table offset. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* The ProcFileHeader structure and the ProcAOUTHeader structure should be
|
||||
* folded together into a single struct exec.
|
||||
*/
|
||||
|
||||
/* Description of the COFF section. */
|
||||
typedef struct {
|
||||
#define COFF_MAGIC 0x0162
|
||||
u_short magic; /* The magic number. */
|
||||
|
||||
u_short numSections; /* The number of sections. */
|
||||
long timeDateStamp; /* Time and date stamp. */
|
||||
long symPtr; /* File pointer to symbolic header. */
|
||||
long numSyms; /* Size of symbolic header. */
|
||||
u_short optHeader; /* Size of optional header. */
|
||||
u_short flags; /* Flags. */
|
||||
} ProcFileHeader;
|
||||
|
||||
/* Description of the a.out section. */
|
||||
typedef struct {
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
short magic; /* Magic number. */
|
||||
|
||||
short verStamp; /* Version stamp. */
|
||||
long codeSize; /* Code size in bytes. */
|
||||
long heapSize; /* Initialized data size in bytes. */
|
||||
long bssSize; /* Uninitialized data size in bytes. */
|
||||
long entry; /* Entry point. */
|
||||
long codeStart; /* Base of code used for this file. */
|
||||
long heapStart; /* Base of heap used for this file. */
|
||||
long bssStart; /* Base of bss used for this file. */
|
||||
long gprMask; /* General purpose register mask. */
|
||||
long cprMask[4]; /* Co-processor register masks. */
|
||||
long gpValue; /* The gp value for this object. */
|
||||
} ProcAOUTHeader;
|
||||
|
||||
/* Section header. */
|
||||
typedef struct {
|
||||
char name[8]; /* Section name. */
|
||||
long physAddr; /* Section physical address. */
|
||||
long virtAddr; /* Section virtual address. */
|
||||
long size; /* Section size. */
|
||||
long sectionPtr; /* File pointer to section data. */
|
||||
long relocPtr; /* File pointer to relocation data. */
|
||||
long lnnoPtr; /* File pointer to gp tables. */
|
||||
u_short numReloc; /* Number of relocation entries. */
|
||||
u_short numLnno; /* Numberof gp tables. */
|
||||
long flags; /* Section flags. */
|
||||
} ProcSectionHeader;
|
||||
|
||||
/* Description of the object file header. */
|
||||
struct exec {
|
||||
ProcFileHeader ex_fhdr;
|
||||
ProcAOUTHeader ex_aout;
|
||||
/* Relocation format. */
|
||||
struct relocation_info_pmax {
|
||||
int r_address; /* offset in text or data segment */
|
||||
unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
|
||||
r_pcrel : 1, /* 1 if value should be pc-relative */
|
||||
r_length : 2, /* log base 2 of value's width */
|
||||
r_extern : 1, /* 1 if need to add symbol to value */
|
||||
r_baserel : 1, /* linkage table relative */
|
||||
r_jmptable : 1, /* relocate to jump table */
|
||||
r_relative : 1, /* load address relative */
|
||||
r_copy : 1; /* run time copy */
|
||||
};
|
||||
#define a_magic ex_aout.magic
|
||||
#define a_text ex_aout.codeSize
|
||||
#define a_data ex_aout.heapSize
|
||||
#define a_bss ex_aout.bssSize
|
||||
#define a_entry ex_aout.entry
|
||||
#define relocation_info relocation_info_pmax
|
||||
|
||||
#define __LDPGSZ 4096 /* linker page size */
|
||||
|
||||
#endif /* !_MACHINE_EXEC_H_ */
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)limits.h 7.6 (Berkeley) 6/25/92
|
||||
* $Id: limits.h,v 1.1.1.1 1993/10/12 03:22:40 deraadt Exp $
|
||||
* $Id: limits.h,v 1.2 1994/01/14 04:53:40 deraadt Exp $
|
||||
*/
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
@ -63,7 +63,12 @@
|
||||
#define INT_MAX 2147483647 /* max value for an int */
|
||||
#define INT_MIN (-2147483647-1) /* min value for an int */
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* gcc won't play with this number without a warning ... */
|
||||
#define ULONG_MAX 4294967295U /* max value for an unsigned long */
|
||||
#else
|
||||
#define ULONG_MAX 4294967295 /* max value for an unsigned long */
|
||||
#endif
|
||||
#define LONG_MAX 2147483647 /* max value for a long */
|
||||
#define LONG_MIN (-2147483647-1) /* min value for a long */
|
||||
|
||||
|
@ -31,118 +31,26 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)exec.h 7.2 (Berkeley) 9/13/92
|
||||
* $Id: aout_machdep.h,v 1.1.1.1 1993/10/12 03:22:41 deraadt Exp $
|
||||
* $Id: aout_machdep.h,v 1.2 1994/01/14 04:53:38 deraadt Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions of this file are subject to the following copyright notice:
|
||||
*
|
||||
* Copyright (C) 1989 Digital Equipment Corporation.
|
||||
* Permission to use, copy, modify, and distribute this software and
|
||||
* its documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appears in all copies.
|
||||
* Digital Equipment Corporation makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
#ifndef _PMAX_EXEC_H_
|
||||
#define _PMAX_EXEC_H_
|
||||
|
||||
/*
|
||||
* /sprite/src/kernel/proc/ds3100.md/RCS/procMach.h,v 9.3 90/02/20 15:35:50
|
||||
* shirriff Exp $ SPRITE (Berkeley)
|
||||
*/
|
||||
|
||||
/* Size of a page in an object file. */
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
/* Valid magic number check. */
|
||||
#define N_BADMAG(ex) \
|
||||
((ex).a_magic != NMAGIC && (ex).a_magic != OMAGIC && \
|
||||
(ex).a_magic != ZMAGIC)
|
||||
|
||||
/* Address of the bottom of the text segment. */
|
||||
#define N_TXTADDR(ex) 0x400000
|
||||
|
||||
/* Address of the bottom of the data segment. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/* Text segment offset. */
|
||||
#define __N_TXTOFF_ROUND(ex) \
|
||||
((ex).ex_aout.verStamp < 23 ? 7 : 15)
|
||||
#define N_TXTOFF(ex) \
|
||||
((ex).ex_aout.magic == ZMAGIC ? 0 : (sizeof(struct exec) + \
|
||||
(ex).ex_fhdr.numSections * sizeof(ProcSectionHeader) + \
|
||||
__N_TXTOFF_ROUND(ex)) & ~__N_TXTOFF_ROUND(ex))
|
||||
|
||||
/* Data segment offset. */
|
||||
#define N_DATOFF(ex) \
|
||||
(N_TXTOFF(ex) + (ex).ex_aout.codeSize)
|
||||
|
||||
/* Symbol table offset. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/* String table offset. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* The ProcFileHeader structure and the ProcAOUTHeader structure should be
|
||||
* folded together into a single struct exec.
|
||||
*/
|
||||
|
||||
/* Description of the COFF section. */
|
||||
typedef struct {
|
||||
#define COFF_MAGIC 0x0162
|
||||
u_short magic; /* The magic number. */
|
||||
|
||||
u_short numSections; /* The number of sections. */
|
||||
long timeDateStamp; /* Time and date stamp. */
|
||||
long symPtr; /* File pointer to symbolic header. */
|
||||
long numSyms; /* Size of symbolic header. */
|
||||
u_short optHeader; /* Size of optional header. */
|
||||
u_short flags; /* Flags. */
|
||||
} ProcFileHeader;
|
||||
|
||||
/* Description of the a.out section. */
|
||||
typedef struct {
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
short magic; /* Magic number. */
|
||||
|
||||
short verStamp; /* Version stamp. */
|
||||
long codeSize; /* Code size in bytes. */
|
||||
long heapSize; /* Initialized data size in bytes. */
|
||||
long bssSize; /* Uninitialized data size in bytes. */
|
||||
long entry; /* Entry point. */
|
||||
long codeStart; /* Base of code used for this file. */
|
||||
long heapStart; /* Base of heap used for this file. */
|
||||
long bssStart; /* Base of bss used for this file. */
|
||||
long gprMask; /* General purpose register mask. */
|
||||
long cprMask[4]; /* Co-processor register masks. */
|
||||
long gpValue; /* The gp value for this object. */
|
||||
} ProcAOUTHeader;
|
||||
|
||||
/* Section header. */
|
||||
typedef struct {
|
||||
char name[8]; /* Section name. */
|
||||
long physAddr; /* Section physical address. */
|
||||
long virtAddr; /* Section virtual address. */
|
||||
long size; /* Section size. */
|
||||
long sectionPtr; /* File pointer to section data. */
|
||||
long relocPtr; /* File pointer to relocation data. */
|
||||
long lnnoPtr; /* File pointer to gp tables. */
|
||||
u_short numReloc; /* Number of relocation entries. */
|
||||
u_short numLnno; /* Numberof gp tables. */
|
||||
long flags; /* Section flags. */
|
||||
} ProcSectionHeader;
|
||||
|
||||
/* Description of the object file header. */
|
||||
struct exec {
|
||||
ProcFileHeader ex_fhdr;
|
||||
ProcAOUTHeader ex_aout;
|
||||
/* Relocation format. */
|
||||
struct relocation_info_pmax {
|
||||
int r_address; /* offset in text or data segment */
|
||||
unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
|
||||
r_pcrel : 1, /* 1 if value should be pc-relative */
|
||||
r_length : 2, /* log base 2 of value's width */
|
||||
r_extern : 1, /* 1 if need to add symbol to value */
|
||||
r_baserel : 1, /* linkage table relative */
|
||||
r_jmptable : 1, /* relocate to jump table */
|
||||
r_relative : 1, /* load address relative */
|
||||
r_copy : 1; /* run time copy */
|
||||
};
|
||||
#define a_magic ex_aout.magic
|
||||
#define a_text ex_aout.codeSize
|
||||
#define a_data ex_aout.heapSize
|
||||
#define a_bss ex_aout.bssSize
|
||||
#define a_entry ex_aout.entry
|
||||
#define relocation_info relocation_info_pmax
|
||||
|
||||
#define __LDPGSZ 4096 /* linker page size */
|
||||
|
||||
#endif /* !_MACHINE_EXEC_H_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cpu.h 7.7 (Berkeley) 11/15/92
|
||||
* $Id: cpu.h,v 1.2 1993/10/15 02:57:11 deraadt Exp $
|
||||
* $Id: cpu.h,v 1.3 1994/01/14 04:53:37 deraadt Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CPU_H_
|
||||
@ -134,10 +134,8 @@ union cpuprid {
|
||||
#define MIPS_R4010 0x05
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef notdef
|
||||
union cpuprid cpu;
|
||||
union cpuprid fpu;
|
||||
#endif
|
||||
u_int machDataCacheSize;
|
||||
u_int machInstCacheSize;
|
||||
extern struct intr_tab intr_tab[];
|
||||
|
@ -31,118 +31,26 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)exec.h 7.2 (Berkeley) 9/13/92
|
||||
* $Id: exec.h,v 1.1.1.1 1993/10/12 03:22:41 deraadt Exp $
|
||||
* $Id: exec.h,v 1.2 1994/01/14 04:53:38 deraadt Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions of this file are subject to the following copyright notice:
|
||||
*
|
||||
* Copyright (C) 1989 Digital Equipment Corporation.
|
||||
* Permission to use, copy, modify, and distribute this software and
|
||||
* its documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appears in all copies.
|
||||
* Digital Equipment Corporation makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
#ifndef _PMAX_EXEC_H_
|
||||
#define _PMAX_EXEC_H_
|
||||
|
||||
/*
|
||||
* /sprite/src/kernel/proc/ds3100.md/RCS/procMach.h,v 9.3 90/02/20 15:35:50
|
||||
* shirriff Exp $ SPRITE (Berkeley)
|
||||
*/
|
||||
|
||||
/* Size of a page in an object file. */
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
/* Valid magic number check. */
|
||||
#define N_BADMAG(ex) \
|
||||
((ex).a_magic != NMAGIC && (ex).a_magic != OMAGIC && \
|
||||
(ex).a_magic != ZMAGIC)
|
||||
|
||||
/* Address of the bottom of the text segment. */
|
||||
#define N_TXTADDR(ex) 0x400000
|
||||
|
||||
/* Address of the bottom of the data segment. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/* Text segment offset. */
|
||||
#define __N_TXTOFF_ROUND(ex) \
|
||||
((ex).ex_aout.verStamp < 23 ? 7 : 15)
|
||||
#define N_TXTOFF(ex) \
|
||||
((ex).ex_aout.magic == ZMAGIC ? 0 : (sizeof(struct exec) + \
|
||||
(ex).ex_fhdr.numSections * sizeof(ProcSectionHeader) + \
|
||||
__N_TXTOFF_ROUND(ex)) & ~__N_TXTOFF_ROUND(ex))
|
||||
|
||||
/* Data segment offset. */
|
||||
#define N_DATOFF(ex) \
|
||||
(N_TXTOFF(ex) + (ex).ex_aout.codeSize)
|
||||
|
||||
/* Symbol table offset. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/* String table offset. */
|
||||
/* NOT DEFINED FOR THE MIPS. */
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* The ProcFileHeader structure and the ProcAOUTHeader structure should be
|
||||
* folded together into a single struct exec.
|
||||
*/
|
||||
|
||||
/* Description of the COFF section. */
|
||||
typedef struct {
|
||||
#define COFF_MAGIC 0x0162
|
||||
u_short magic; /* The magic number. */
|
||||
|
||||
u_short numSections; /* The number of sections. */
|
||||
long timeDateStamp; /* Time and date stamp. */
|
||||
long symPtr; /* File pointer to symbolic header. */
|
||||
long numSyms; /* Size of symbolic header. */
|
||||
u_short optHeader; /* Size of optional header. */
|
||||
u_short flags; /* Flags. */
|
||||
} ProcFileHeader;
|
||||
|
||||
/* Description of the a.out section. */
|
||||
typedef struct {
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
short magic; /* Magic number. */
|
||||
|
||||
short verStamp; /* Version stamp. */
|
||||
long codeSize; /* Code size in bytes. */
|
||||
long heapSize; /* Initialized data size in bytes. */
|
||||
long bssSize; /* Uninitialized data size in bytes. */
|
||||
long entry; /* Entry point. */
|
||||
long codeStart; /* Base of code used for this file. */
|
||||
long heapStart; /* Base of heap used for this file. */
|
||||
long bssStart; /* Base of bss used for this file. */
|
||||
long gprMask; /* General purpose register mask. */
|
||||
long cprMask[4]; /* Co-processor register masks. */
|
||||
long gpValue; /* The gp value for this object. */
|
||||
} ProcAOUTHeader;
|
||||
|
||||
/* Section header. */
|
||||
typedef struct {
|
||||
char name[8]; /* Section name. */
|
||||
long physAddr; /* Section physical address. */
|
||||
long virtAddr; /* Section virtual address. */
|
||||
long size; /* Section size. */
|
||||
long sectionPtr; /* File pointer to section data. */
|
||||
long relocPtr; /* File pointer to relocation data. */
|
||||
long lnnoPtr; /* File pointer to gp tables. */
|
||||
u_short numReloc; /* Number of relocation entries. */
|
||||
u_short numLnno; /* Numberof gp tables. */
|
||||
long flags; /* Section flags. */
|
||||
} ProcSectionHeader;
|
||||
|
||||
/* Description of the object file header. */
|
||||
struct exec {
|
||||
ProcFileHeader ex_fhdr;
|
||||
ProcAOUTHeader ex_aout;
|
||||
/* Relocation format. */
|
||||
struct relocation_info_pmax {
|
||||
int r_address; /* offset in text or data segment */
|
||||
unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
|
||||
r_pcrel : 1, /* 1 if value should be pc-relative */
|
||||
r_length : 2, /* log base 2 of value's width */
|
||||
r_extern : 1, /* 1 if need to add symbol to value */
|
||||
r_baserel : 1, /* linkage table relative */
|
||||
r_jmptable : 1, /* relocate to jump table */
|
||||
r_relative : 1, /* load address relative */
|
||||
r_copy : 1; /* run time copy */
|
||||
};
|
||||
#define a_magic ex_aout.magic
|
||||
#define a_text ex_aout.codeSize
|
||||
#define a_data ex_aout.heapSize
|
||||
#define a_bss ex_aout.bssSize
|
||||
#define a_entry ex_aout.entry
|
||||
#define relocation_info relocation_info_pmax
|
||||
|
||||
#define __LDPGSZ 4096 /* linker page size */
|
||||
|
||||
#endif /* !_MACHINE_EXEC_H_ */
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)limits.h 7.6 (Berkeley) 6/25/92
|
||||
* $Id: limits.h,v 1.1.1.1 1993/10/12 03:22:40 deraadt Exp $
|
||||
* $Id: limits.h,v 1.2 1994/01/14 04:53:40 deraadt Exp $
|
||||
*/
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
@ -63,7 +63,12 @@
|
||||
#define INT_MAX 2147483647 /* max value for an int */
|
||||
#define INT_MIN (-2147483647-1) /* min value for an int */
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* gcc won't play with this number without a warning ... */
|
||||
#define ULONG_MAX 4294967295U /* max value for an unsigned long */
|
||||
#else
|
||||
#define ULONG_MAX 4294967295 /* max value for an unsigned long */
|
||||
#endif
|
||||
#define LONG_MAX 2147483647 /* max value for a long */
|
||||
#define LONG_MIN (-2147483647-1) /* min value for a long */
|
||||
|
||||
|
@ -37,14 +37,19 @@
|
||||
*
|
||||
* from: Utah Hdr: machparam.h 1.11 89/08/14
|
||||
* from: @(#)param.h 7.9 (Berkeley) 2/4/93
|
||||
* $Id: param.h,v 1.1.1.1 1993/10/12 03:22:39 deraadt Exp $
|
||||
* $Id: param.h,v 1.2 1994/01/14 04:53:41 deraadt Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Machine dependent constants for DEC Station 3100.
|
||||
*/
|
||||
#define MACHINE "mips"
|
||||
#define COFF
|
||||
#define MACHINE "pmax"
|
||||
#define MACHINE_ARCH "mips"
|
||||
#define MID_MACHINE MID_PMAX
|
||||
|
||||
#ifdef KERNEL /* XXX */
|
||||
#include <machine/cpu.h> /* XXX */
|
||||
#endif /* XXX */
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value for all
|
||||
@ -94,7 +99,7 @@
|
||||
#ifdef GATEWAY
|
||||
#define NMBCLUSTERS 512 /* map size, max cluster allocation */
|
||||
#else
|
||||
#define NMBCLUSTERS 512 /* map size, max cluster allocation */
|
||||
#define NMBCLUSTERS 256 /* map size, max cluster allocation */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user