Keep track of each side's idea of what the state of each option is.
[unix-history] / usr / src / old / dlmpcc / scnhdr.h
CommitLineData
0b9ebc2c
KB
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 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the University of California, Berkeley. The name of the
14 * University may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * @(#)scnhdr.h 5.2 (Berkeley) %G%
21 */
20e9ef9e
SL
22
23struct scnhdr {
24 char s_name[8]; /* section name */
25 long s_paddr; /* physical address */
26 long s_vaddr; /* virtual address */
27 long s_size; /* section size */
28 long s_scnptr; /* file ptr to raw data for section */
29 long s_relptr; /* file ptr to relocation */
30 long s_lnnoptr; /* file ptr to line numbers */
31 unsigned short s_nreloc; /* number of relocation entries */
32 unsigned short s_nlnno; /* number of line number entries */
33 long s_flags; /* flags */
34 };
35
36#define SCNHDR struct scnhdr
37#define SCNHSZ sizeof(SCNHDR)
38
39
40
41
42/*
43 * Define constants for names of "special" sections
44 */
45
46#define _TEXT ".text"
47#define _DATA ".data"
48#define _BSS ".bss"
49#define _TV ".tv"
50
51
52
53
54/*
55 * The low 4 bits of s_flags is used as a section "type"
56 */
57
58#define STYP_REG 0x00 /* "regular" section:
59 allocated, relocated, loaded */
60#define STYP_DSECT 0x01 /* "dummy" section:
61 not allocated, relocated,
62 not loaded */
63#define STYP_NOLOAD 0x02 /* "noload" section:
64 allocated, relocated,
65 not loaded */
66#define STYP_GROUP 0x04 /* "grouped" section:
67 formed of input sections */
68#define STYP_PAD 0x08 /* "padding" section:
69 not allocated, not relocated,
70 loaded */
71#define STYP_COPY 0x10 /* "copy" section:
72 for decision function used
73 by field update; not
74 allocated, not relocated,
75 loaded; reloc & lineno
76 entries processed normally */
77#define STYP_TEXT 0x20 /* section contains text only */
78#define STYP_DATA 0x40 /* section contains data only */
79#define STYP_BSS 0x80 /* section contains bss only */
80
81/*
82 * In a minimal file or an update file, a new function
83 * (as compared with a replaced function) is indicated by S_NEWFCN
84 */
85
86#define S_NEWFCN 0x10
87
88/*
89 * In 3b Update Files (output of ogen), sections which appear in SHARED
90 * segments of the Pfile will have the S_SHRSEG flag set by ogen, to inform
91 * dufr that updating 1 copy of the proc. will update all process invocations.
92 */
93
94#define S_SHRSEG 0x20