xref: /csrg-svn/old/dlmpcc/scnhdr.h (revision 42795)
135523Sbostic /*
235523Sbostic  * Copyright (c) 1988 The Regents of the University of California.
335523Sbostic  * All rights reserved.
435523Sbostic  *
535523Sbostic  * This code is derived from software contributed to Berkeley by
635523Sbostic  * Computer Consoles Inc.
735523Sbostic  *
8*42795Sbostic  * %sccs.include.redist.c%
935523Sbostic  *
10*42795Sbostic  *	@(#)scnhdr.h	5.3 (Berkeley) 06/01/90
1135523Sbostic  */
1232619Ssam 
1332619Ssam struct scnhdr {
1432619Ssam 	char		s_name[8];	/* section name */
1532619Ssam 	long		s_paddr;	/* physical address */
1632619Ssam 	long		s_vaddr;	/* virtual address */
1732619Ssam 	long		s_size;		/* section size */
1832619Ssam 	long		s_scnptr;	/* file ptr to raw data for section */
1932619Ssam 	long		s_relptr;	/* file ptr to relocation */
2032619Ssam 	long		s_lnnoptr;	/* file ptr to line numbers */
2132619Ssam 	unsigned short	s_nreloc;	/* number of relocation entries */
2232619Ssam 	unsigned short	s_nlnno;	/* number of line number entries */
2332619Ssam 	long		s_flags;	/* flags */
2432619Ssam 	};
2532619Ssam 
2632619Ssam #define	SCNHDR	struct scnhdr
2732619Ssam #define	SCNHSZ	sizeof(SCNHDR)
2832619Ssam 
2932619Ssam 
3032619Ssam 
3132619Ssam 
3232619Ssam /*
3332619Ssam  * Define constants for names of "special" sections
3432619Ssam  */
3532619Ssam 
3632619Ssam #define _TEXT ".text"
3732619Ssam #define _DATA ".data"
3832619Ssam #define _BSS  ".bss"
3932619Ssam #define _TV  ".tv"
4032619Ssam 
4132619Ssam 
4232619Ssam 
4332619Ssam 
4432619Ssam /*
4532619Ssam  * The low 4 bits of s_flags is used as a section "type"
4632619Ssam  */
4732619Ssam 
4832619Ssam #define STYP_REG	0x00		/* "regular" section:
4932619Ssam 						allocated, relocated, loaded */
5032619Ssam #define STYP_DSECT	0x01		/* "dummy" section:
5132619Ssam 						not allocated, relocated,
5232619Ssam 						not loaded */
5332619Ssam #define STYP_NOLOAD	0x02		/* "noload" section:
5432619Ssam 						allocated, relocated,
5532619Ssam 						 not loaded */
5632619Ssam #define STYP_GROUP	0x04		/* "grouped" section:
5732619Ssam 						formed of input sections */
5832619Ssam #define STYP_PAD	0x08		/* "padding" section:
5932619Ssam 						not allocated, not relocated,
6032619Ssam 						 loaded */
6132619Ssam #define STYP_COPY	0x10		/* "copy" section:
6232619Ssam 						for decision function used
6332619Ssam 						by field update;  not
6432619Ssam 						allocated, not relocated,
6532619Ssam 						loaded;  reloc & lineno
6632619Ssam 						entries processed normally */
6732619Ssam #define	STYP_TEXT	0x20		/* section contains text only */
6832619Ssam #define STYP_DATA	0x40		/* section contains data only */
6932619Ssam #define STYP_BSS	0x80		/* section contains bss only */
7032619Ssam 
7132619Ssam /*
7232619Ssam  *  In a minimal file or an update file, a new function
7332619Ssam  *  (as compared with a replaced function) is indicated by S_NEWFCN
7432619Ssam  */
7532619Ssam 
7632619Ssam #define S_NEWFCN  0x10
7732619Ssam 
7832619Ssam /*
7932619Ssam  * In 3b Update Files (output of ogen), sections which appear in SHARED
8032619Ssam  * segments of the Pfile will have the S_SHRSEG flag set by ogen, to inform
8132619Ssam  * dufr that updating 1 copy of the proc. will update all process invocations.
8232619Ssam  */
8332619Ssam 
8432619Ssam #define S_SHRSEG	0x20
85