xref: /csrg-svn/old/dlmpcc/scnhdr.h (revision 35523)
1*35523Sbostic /*
2*35523Sbostic  * Copyright (c) 1988 The Regents of the University of California.
3*35523Sbostic  * All rights reserved.
4*35523Sbostic  *
5*35523Sbostic  * This code is derived from software contributed to Berkeley by
6*35523Sbostic  * Computer Consoles Inc.
7*35523Sbostic  *
8*35523Sbostic  * Redistribution and use in source and binary forms are permitted
9*35523Sbostic  * provided that the above copyright notice and this paragraph are
10*35523Sbostic  * duplicated in all such forms and that any documentation,
11*35523Sbostic  * advertising materials, and other materials related to such
12*35523Sbostic  * distribution and use acknowledge that the software was developed
13*35523Sbostic  * by the University of California, Berkeley.  The name of the
14*35523Sbostic  * University may not be used to endorse or promote products derived
15*35523Sbostic  * from this software without specific prior written permission.
16*35523Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17*35523Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18*35523Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19*35523Sbostic  *
20*35523Sbostic  *	@(#)scnhdr.h	5.2 (Berkeley) 09/18/88
21*35523Sbostic  */
2232619Ssam 
2332619Ssam struct scnhdr {
2432619Ssam 	char		s_name[8];	/* section name */
2532619Ssam 	long		s_paddr;	/* physical address */
2632619Ssam 	long		s_vaddr;	/* virtual address */
2732619Ssam 	long		s_size;		/* section size */
2832619Ssam 	long		s_scnptr;	/* file ptr to raw data for section */
2932619Ssam 	long		s_relptr;	/* file ptr to relocation */
3032619Ssam 	long		s_lnnoptr;	/* file ptr to line numbers */
3132619Ssam 	unsigned short	s_nreloc;	/* number of relocation entries */
3232619Ssam 	unsigned short	s_nlnno;	/* number of line number entries */
3332619Ssam 	long		s_flags;	/* flags */
3432619Ssam 	};
3532619Ssam 
3632619Ssam #define	SCNHDR	struct scnhdr
3732619Ssam #define	SCNHSZ	sizeof(SCNHDR)
3832619Ssam 
3932619Ssam 
4032619Ssam 
4132619Ssam 
4232619Ssam /*
4332619Ssam  * Define constants for names of "special" sections
4432619Ssam  */
4532619Ssam 
4632619Ssam #define _TEXT ".text"
4732619Ssam #define _DATA ".data"
4832619Ssam #define _BSS  ".bss"
4932619Ssam #define _TV  ".tv"
5032619Ssam 
5132619Ssam 
5232619Ssam 
5332619Ssam 
5432619Ssam /*
5532619Ssam  * The low 4 bits of s_flags is used as a section "type"
5632619Ssam  */
5732619Ssam 
5832619Ssam #define STYP_REG	0x00		/* "regular" section:
5932619Ssam 						allocated, relocated, loaded */
6032619Ssam #define STYP_DSECT	0x01		/* "dummy" section:
6132619Ssam 						not allocated, relocated,
6232619Ssam 						not loaded */
6332619Ssam #define STYP_NOLOAD	0x02		/* "noload" section:
6432619Ssam 						allocated, relocated,
6532619Ssam 						 not loaded */
6632619Ssam #define STYP_GROUP	0x04		/* "grouped" section:
6732619Ssam 						formed of input sections */
6832619Ssam #define STYP_PAD	0x08		/* "padding" section:
6932619Ssam 						not allocated, not relocated,
7032619Ssam 						 loaded */
7132619Ssam #define STYP_COPY	0x10		/* "copy" section:
7232619Ssam 						for decision function used
7332619Ssam 						by field update;  not
7432619Ssam 						allocated, not relocated,
7532619Ssam 						loaded;  reloc & lineno
7632619Ssam 						entries processed normally */
7732619Ssam #define	STYP_TEXT	0x20		/* section contains text only */
7832619Ssam #define STYP_DATA	0x40		/* section contains data only */
7932619Ssam #define STYP_BSS	0x80		/* section contains bss only */
8032619Ssam 
8132619Ssam /*
8232619Ssam  *  In a minimal file or an update file, a new function
8332619Ssam  *  (as compared with a replaced function) is indicated by S_NEWFCN
8432619Ssam  */
8532619Ssam 
8632619Ssam #define S_NEWFCN  0x10
8732619Ssam 
8832619Ssam /*
8932619Ssam  * In 3b Update Files (output of ogen), sections which appear in SHARED
9032619Ssam  * segments of the Pfile will have the S_SHRSEG flag set by ogen, to inform
9132619Ssam  * dufr that updating 1 copy of the proc. will update all process invocations.
9232619Ssam  */
9332619Ssam 
9432619Ssam #define S_SHRSEG	0x20
95