xref: /original-bsd/old/dlmpcc/scnhdr.h (revision bff54947)
1 /*
2  * Copyright (c) 1988 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Computer Consoles Inc.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)scnhdr.h	5.3 (Berkeley) 06/01/90
11  */
12 
13 struct scnhdr {
14 	char		s_name[8];	/* section name */
15 	long		s_paddr;	/* physical address */
16 	long		s_vaddr;	/* virtual address */
17 	long		s_size;		/* section size */
18 	long		s_scnptr;	/* file ptr to raw data for section */
19 	long		s_relptr;	/* file ptr to relocation */
20 	long		s_lnnoptr;	/* file ptr to line numbers */
21 	unsigned short	s_nreloc;	/* number of relocation entries */
22 	unsigned short	s_nlnno;	/* number of line number entries */
23 	long		s_flags;	/* flags */
24 	};
25 
26 #define	SCNHDR	struct scnhdr
27 #define	SCNHSZ	sizeof(SCNHDR)
28 
29 
30 
31 
32 /*
33  * Define constants for names of "special" sections
34  */
35 
36 #define _TEXT ".text"
37 #define _DATA ".data"
38 #define _BSS  ".bss"
39 #define _TV  ".tv"
40 
41 
42 
43 
44 /*
45  * The low 4 bits of s_flags is used as a section "type"
46  */
47 
48 #define STYP_REG	0x00		/* "regular" section:
49 						allocated, relocated, loaded */
50 #define STYP_DSECT	0x01		/* "dummy" section:
51 						not allocated, relocated,
52 						not loaded */
53 #define STYP_NOLOAD	0x02		/* "noload" section:
54 						allocated, relocated,
55 						 not loaded */
56 #define STYP_GROUP	0x04		/* "grouped" section:
57 						formed of input sections */
58 #define STYP_PAD	0x08		/* "padding" section:
59 						not allocated, not relocated,
60 						 loaded */
61 #define STYP_COPY	0x10		/* "copy" section:
62 						for decision function used
63 						by field update;  not
64 						allocated, not relocated,
65 						loaded;  reloc & lineno
66 						entries processed normally */
67 #define	STYP_TEXT	0x20		/* section contains text only */
68 #define STYP_DATA	0x40		/* section contains data only */
69 #define STYP_BSS	0x80		/* section contains bss only */
70 
71 /*
72  *  In a minimal file or an update file, a new function
73  *  (as compared with a replaced function) is indicated by S_NEWFCN
74  */
75 
76 #define S_NEWFCN  0x10
77 
78 /*
79  * In 3b Update Files (output of ogen), sections which appear in SHARED
80  * segments of the Pfile will have the S_SHRSEG flag set by ogen, to inform
81  * dufr that updating 1 copy of the proc. will update all process invocations.
82  */
83 
84 #define S_SHRSEG	0x20
85