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