blob: 190660d70c4d114f7b4165d7b20b22744b025a39 (
plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
/*
* Linker script for an MS-DOS EXE binary; this hard-codes a simple
* MZ header without relocations.
*
* For documentation on the MS-DOS MZ EXE format, see:
* http://www.delorie.com/djgpp/doc/exe/
*/
/* Script for -z combreloc: combine and sort reloc sections */
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
OUTPUT_ARCH(i386)
EXTERN(_start)
ENTRY(_start)
SECTIONS
{
. = 0;
/* EXE header, from header.S */
.header : {
*(.header)
} =0
. = ALIGN(16);
__header_size = .;
__dgroup_lma = .;
/* The CS/SS segment starts immediately after the header */
_exe_text_seg = 0;
/* ----------------------------------------------------------------- *
* Sections kept at TSR time
* ----------------------------------------------------------------- */
. = 0;
__rtext_vma = .;
.rtext : AT (__rtext_vma + __dgroup_lma) {
*(.rtext)
} =0x90909090
_ertext = .;
. = ALIGN(4);
__rrodata_vma = .;
.rrodata : AT (__rrodata_vma + __dgroup_lma) {
*(SORT_BY_ALIGNMENT(.rrodata*))
}
_errodata = .;
. = ALIGN(4);
__rdata_vma = .;
.rdata : AT (__rdata_vma + __dgroup_lma) {
*(SORT_BY_ALIGNMENT(.rdata*))
}
_erdata = .;
. = ALIGN(16);
__rbss_vma = .;
.rbss (NOLOAD) : {
__rbss_start = .;
*(SORT_BY_ALIGNMENT(.rbss*))
__rbss_end = .;
}
. = ALIGN(16);
.rbuf (NOLOAD) : {
__rbuf_start = .;
*(.rbuf)
__rbuf_end = .;
}
. = ALIGN(16);
__tsr_end = .;
/* ----------------------------------------------------------------- *
* Sections dropped at TSR time
* ----------------------------------------------------------------- */
/* .textearly overlays the .rbss segment */
__textearly_vma = __rbss_vma;
__textearly_lma = __dgroup_lma + __rbss_vma;
. = __textearly_vma;
.textearly : AT (__textearly_lma) {
*(.textearly)
} = 0x90909090
. = ALIGN(16);
_etextearly = .;
_exe_start = _start;
. = (_etextearly > __tsr_end) ? _etextearly : __tsr_end;
__init_vma = .;
__init_lma = __dgroup_lma + _etextearly - __init_vma;
. = ALIGN(4);
__text_vma = .;
.text : AT (__text_vma + __init_lma) {
*(.text)
} = 0x90909090
_etext = .;
. = ALIGN(4);
__rodata_vma = .;
.rodata : AT(__rodata_vma + __init_lma) {
*(SORT_BY_ALIGNMENT (.rodata*))
} = 0
. = ALIGN(4);
__data_vma = .;
.data : AT(__data_vma + __init_lma) {
*(SORT_BY_ALIGNMENT (.data*))
. = ALIGN(16);
} = 0
_edata = .;
_edata_premove = _edata + __init_lma - __dgroup_lma;
__move_dwords = (_edata - __text_vma) >> 2;
_exe_edata_low = ((_edata + __init_lma) & 511);
_exe_edata_blocks = ((_edata + __init_lma) + 511) >> 9;
. = ALIGN(16);
.bss (NOLOAD) : {
__bss_start = .;
*(SORT_BY_ALIGNMENT (.bss*))
__bss_end = .;
}
. = ALIGN(16);
.heap (NOLOAD) : {
__heap_start = .;
*(.heap)
__heap_end = .;
}
. = ALIGN(16);
.stack (NOLOAD) : {
__stack_start = .;
*(.stack)
__stack_end = .;
}
. = ALIGN(16);
_end = .;
_exe_bss_paras = (_end >> 4) - (_edata_premove >> 4);
}
|