version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
ld86 |
|
|
2 |
!!!ld86 |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
PREDEFINED LABELS |
|
|
8 |
HISTORY |
|
|
9 |
BUGS |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
ld86 - Linker for as86(1) |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__ld86__ [[__-03MNdimrstyz__[[-]] |
|
|
19 |
[[__-llib_extension__] [[__-o outfile__] |
|
|
20 |
[[__-Ccrtfile__] [[__-Llibdir__] [[__-Olibfile__] |
|
|
21 |
[[__-Ttextaddr__] [[__-Hheapsize__] [[__-Ddataaddr__] |
|
|
22 |
__infile...__ |
|
|
23 |
!!DESCRIPTION |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
This linker understands only the object files produced by |
|
|
27 |
the as86 assembler, it can link them into either an impure |
|
|
28 |
or a separate I |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
The linking defaults are everything off or none except for |
|
|
32 |
__-0__ and the output file is __a.out__. There is |
|
|
33 |
''not'' a standard library location defined in the |
|
|
34 |
linker. |
|
|
35 |
!!OPTIONS |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
__-0__ |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
produce header with 16-bit magic |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
__-3__ |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
produce header with 32-bit magic |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
__-d__ |
|
|
51 |
|
|
|
52 |
|
|
|
53 |
delete the header from the output file, used for MSDOS COM |
|
|
54 |
files. As a side effect this also includes -s as there's |
|
|
55 |
nowhere to put a symbol table. |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
__-Cx__ |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
add file libdir-from-search/crtx.o to list of files |
|
|
62 |
linked |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
__-D__ |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
data base address follows (in format suitable for |
|
|
69 |
strtoul) |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
__-H__ |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
the top of heap (initial stack) address (in format suitable |
|
|
76 |
for strtoul) |
|
|
77 |
|
|
|
78 |
|
|
|
79 |
__-Lx__ |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
add dir name x to the head of the list of library dirs |
|
|
83 |
searched |
|
|
84 |
|
|
|
85 |
|
|
|
86 |
__-M__ |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
print symbols linked on stdout |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
__-N__ |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
Create a native Linux OMAGIC output file. If the contents |
|
|
96 |
are i386 code the binary can be either linked by GCC or |
|
|
97 |
executed by linux. If the __-z__ option is also included |
|
|
98 |
the linker can generate a QMAGIC executable. |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
__-Ox__ |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
add library libdir-from-search/x to list of files |
|
|
105 |
linked |
|
|
106 |
|
|
|
107 |
|
|
|
108 |
__-T__ |
|
|
109 |
|
|
|
110 |
|
|
|
111 |
text base address follows (in format suitable for |
|
|
112 |
strtoul) |
|
|
113 |
|
|
|
114 |
|
|
|
115 |
__-i__ |
|
|
116 |
|
|
|
117 |
|
|
|
118 |
separate I |
|
|
119 |
|
|
|
120 |
|
|
|
121 |
__-lx__ |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
add library libdir-from-search/libx.a to list of files |
|
|
125 |
linked |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
__-m__ |
|
|
129 |
|
|
|
130 |
|
|
|
131 |
print modules linked on stdout |
|
|
132 |
|
|
|
133 |
|
|
|
134 |
__-o__ |
|
|
135 |
|
|
|
136 |
|
|
|
137 |
output file name follows |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
__-s__ |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
strip symbols |
|
|
144 |
|
|
|
145 |
|
|
|
146 |
__-r__ |
|
|
147 |
|
|
|
148 |
|
|
|
149 |
Generate a relocatable object from one source object, if the |
|
|
150 |
linker is given the -N option also the output format will be |
|
|
151 |
the hosts native format if possible. |
|
|
152 |
|
|
|
153 |
|
|
|
154 |
__-t__ |
|
|
155 |
|
|
|
156 |
|
|
|
157 |
trace modules being looked at on stdout |
|
|
158 |
|
|
|
159 |
|
|
|
160 |
__-y__ |
|
|
161 |
|
|
|
162 |
|
|
|
163 |
Alter the symbol tables to add label 'extensions' so that |
|
|
164 |
labels with more than 8 characters can be stored in elks |
|
|
165 |
executables. |
|
|
166 |
|
|
|
167 |
|
|
|
168 |
__-z__ |
|
|
169 |
|
|
|
170 |
|
|
|
171 |
produce |
|
|
172 |
|
|
|
173 |
|
|
|
174 |
All the options not taking an argument may be turned off by |
|
|
175 |
following the option letter by a '-', as for |
|
|
176 |
cc1. |
|
|
177 |
!!PREDEFINED LABELS |
|
|
178 |
|
|
|
179 |
|
|
|
180 |
The linker predefines several labels that can be imported |
|
|
181 |
into user programs. |
|
|
182 |
|
|
|
183 |
|
|
|
184 |
____etext__ |
|
|
185 |
|
|
|
186 |
|
|
|
187 |
Standard C variable for the end of the text |
|
|
188 |
segment. |
|
|
189 |
|
|
|
190 |
|
|
|
191 |
____edata__ |
|
|
192 |
|
|
|
193 |
|
|
|
194 |
Standard C variable for the end of the initilised |
|
|
195 |
data. |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
____end__ |
|
|
199 |
|
|
|
200 |
|
|
|
201 |
Standard C variable for the end of the bss |
|
|
202 |
area. |
|
|
203 |
|
|
|
204 |
|
|
|
205 |
____segoff__ |
|
|
206 |
|
|
|
207 |
|
|
|
208 |
The offset within the executable file between the start of |
|
|
209 |
the text segment and the start of the data segment in 16 |
|
|
210 |
byte 'paragraphs'. Note this is __zero__ for impure (tiny |
|
|
211 |
model) executables and is adjusted for executables that |
|
|
212 |
don't start at offset 0 within the segment. |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
____segXDL__ |
|
|
216 |
|
|
|
217 |
|
|
|
218 |
The lowest address with data in segment 'X'. (eg __seg0DL is |
|
|
219 |
for segment zero or the text segment, __seg3DL is for the |
|
|
220 |
data segment) The value 'X' is a hex digit. |
|
|
221 |
|
|
|
222 |
|
|
|
223 |
____segXDH__ |
|
|
224 |
|
|
|
225 |
|
|
|
226 |
The top of segment 'X's data area. |
|
|
227 |
|
|
|
228 |
|
|
|
229 |
____segXCL__ |
|
|
230 |
|
|
|
231 |
|
|
|
232 |
The bottom of segment 'X's 'common data' or unitilised data |
|
|
233 |
area. Each segment has both an initilised and unitilised |
|
|
234 |
data area. |
|
|
235 |
|
|
|
236 |
|
|
|
237 |
____segXCH__ |
|
|
238 |
|
|
|
239 |
|
|
|
240 |
The top of segment 'X's common area. |
|
|
241 |
|
|
|
242 |
|
|
|
243 |
____segXSO__ |
|
|
244 |
|
|
|
245 |
|
|
|
246 |
This is the adjusted offset from segment 0 of the start of |
|
|
247 |
segment 'X' in 'paragraphs'. |
|
|
248 |
!!HISTORY |
|
|
249 |
|
|
|
250 |
|
|
|
251 |
The 6809 version does not support -i. |
|
|
252 |
|
|
|
253 |
|
|
|
254 |
The previous versions of the linker could produce an 8086 |
|
|
255 |
executable with segments of a size |
|
|
256 |
!!BUGS |
|
|
257 |
|
|
|
258 |
|
|
|
259 |
The linker cannot deal with reverse seeks caused by |
|
|
260 |
__org__ instructions in the object file. Unlike previous |
|
|
261 |
versions the current one traps the error rather than trying |
|
|
262 |
to fill up the hard disk. |
|
|
263 |
|
|
|
264 |
|
|
|
265 |
The linker produces a broken a.out object file if given one |
|
|
266 |
input and the __-r__ option this is so it is compatible |
|
|
267 |
with pre-dev86 versions. |
|
|
268 |
---- |