header.h
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Copyright (C) 1998 by the Board of Trustees
* of Leland Stanford Junior University.
* Copyright (C) 1998 Digital Equipment Corporation
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
#ifndef _HEADER_H_
#define _HEADER_H_
/*
* The structure to hold the data read from the header of a COFF executable
*/
struct header {
/* private data */
ulong data_start;
ulong data_size;
ulong data_seek;
/* this has the total size of all the data segments */
ulong total_data_size;
/* bss - block started by symbol */
ulong bss_start;
ulong bss_size;
ulong bss_seek;
/* read only data */
ulong rdata_start;
ulong rdata_size;
ulong rdata_seek;
/* exeception data */
ulong pdata_start;
ulong pdata_size;
ulong pdata_seek;
/* read only constant data */
ulong rconst_start;
ulong rconst_size;
ulong rconst_seek;
/* text segment */
ulong text_start;
ulong text_size;
ulong text_seek;
/* small data */
ulong sdata_seek;
/* one last thing - global pointer */
ulong gp;
} header_t;
/* data structures for the text cache */
typedef struct text_cache {
char *path;
void *p;
}text_cache_t;
#endif /* _HEADER_H_ */