-
Notifications
You must be signed in to change notification settings - Fork 1
/
llf_vms.doc
320 lines (265 loc) · 15.2 KB
/
llf_vms.doc
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
LLF replaces the three Unix utilities Link, Locate and Format. It does all
three steps in one taking less than 1/4 the cpu time required for the
Unix utilites (and if it is inputing and outputting binary files, it is
3 times faster still [about 10-12 times faster overall]).
To run this utility on a VMS system, type:
$ LLF [/cmd_qualifiers...] file,...[/file_qualifiers...]
There can be any number of input files limited only by DCL command length
constraints and/or virtual memory quotas. The input files may be either the .OL
object format (such as that output by compiliers and/or assemblers), an object
file generated by an RT-11 or RSX-11 utility (such as MAC65 or MACRO/RSX
respectively), a library file or an option file. The file format is identified
by the file type characters and the filename qualifier; .OL indicates the OL
format and .OBJ indicates the binary object format. The Library and Option files
MUST be identified with the /LIBRARY and /OPTION filename qualifiers. The input
file type is defaulted to .OL. If the file is not found, then LLF attempts to
open it with a default type of .OBJ before declaring a file-not-found error. If
the /OBJECT qualifier is specified, then LLF uses .OBJ as the primary default
file type and .OL as the secondary default file type (i.e. it reverses the order
of file lookup, so, if you know most of the input files are of type .OBJ, then
the /OBJECT could save some file lookup time). Commas are optional and treated
as white space. Only the first 5 characters are significant on any of the
command qualifiers, although any of them may be abbreviated to 1 or more
characters. On the Atari ST version, the /OBJECT and /VLDA qualifiers are
ignored.
The /cmd_qualifiers can appear anywhere on the command line. The items listed
in []'s are optional arguments to the qualifier;
Qualifier Default Description
----------------- ---------- ---------------
/[NO]CROSS_REFERENCE /NOCROSS_REFERENCE Cross reference
/[NO]OBJECT /NOOBJECT Default input .OBJ
/[NO]VLDA /NOVLDA Output in VLDA fmt
/[NO]RELATIVE /NORELATIVE Relative output
/[NO]DEBUG /NODEBUG Output debug msgs
/[NO]OUTPUT[=filename] /OUTPUT= Output filename
SYS$DISK:[]first_input_filename.HEX
or if /VLDA is present SYS$DISK:[]first_input_filename.VLDA
or if /REL is present SYS$DISK:[]first_input_filename.OL
or if /VLDA and /REL SYS$DISK:[]first_input_filename.OBJ
/[NO]MAP[=filename] /NOMAP Map filename
filename=SYS$DISK:[]output_filename.MAP
/[NO]SYMBOL[=filename] /NOSYMBOL Symbol filename
filename=SYS$DISK:[]map_filename.SYM
or if /VLDA is present SYS$DISK:[]map_filename.OBJ
/[NO]SECTION[=filename] /NOSECTION Section filename
filename=SYS$DISK:[]symbol_filename.SEC
or if /VLDA is present SYS$DISK:[]symbol_filename.OBJ
/WORK[=n] /NOWORK work file enable
/[NO]QUIET /NOQUIET suppress warnings about multiple defines from a .stb file.
The following 2 qualifiers are local to the filename that they follow and
indicate the type of file that the name is specifying:
Qualifier Default file type used Description
---------------- ----------------------- -----------
/OPTION .OPT Option file
/LIBRARY .LIB Library file
The qualifiers can be abbreviated to 1 char or less. Descriptions of the
command qualifiers follows:
/CROSS_REFERENCE - Cross references the global symbols used by filename and
lists them in the MAP file. Forces the /MAP option. In the filename
list, the first file listed is the one that defined the symbol
unless the symbol was undefined (indicated by a message).
/VLDA - Forces the output file format to be written in a special binary
format. This format is more effecient (on the VAX) than the tekhex
format. (Ignored on the Atari ST).
/OBJECT - causes the default input file type to be .OBJ instead of .OL.
That is, files are first attempted to be opened with a file type of
.OBJ and if a file-not-found condition exists, then they are again
attempted to be opened with a default file type of .OL. (Ignored
on the Atari ST).
/RELATIVE - Output file is in a relative format. That is, the segments are
not located and global symbols may not be completely resolved. If
this option is selected, then the default output file type is changed
from .HEX to .OL (the output can be run through LLF again to do the
final locate and format). If /VLDA is present, then the default
changes to .OBJ.
/ERROR - Forces LLF to display undefined symbol and other messages that would
normally be suppressed during a /RELATIVE link. Use this if you need
a relative output but are not intending to re-link the output with
additional object modules or just want to be informed of any unresolved
global references.
/DEBUG - Causes various debugging messages to be displayed at various stages
in the link/locate/format procedures. Use of this feature will slow
down the creation of the output.
/OUTPUT - Allows you to specify an output file name that may be different than
the input filename(s). This option is defaulted and the filename used
is the same as the first non-library or non-option file input. Note
that the file is created in the current default directory and not
necessarily the directory that the input file(s) are located in.
/MAP - Specifies that LLF create a printable MAP file with the output image
statistics (such as segment placement and global symbol values).
The optional value allows for filename to be specified if different
than that of the output filename. Note that segment and symbol names
may be 32 characters in length but the rightmost characters may
be truncated on the link map in order to make a reasonable display
format. All the characters remain significant for linking purposes
regardless of what is displayed on the link map.
/OCTAL - Specifies that all the values displayed in error messages and on the
link map be done using an octal radix. The segment and symbol name
fields may be further truncated to accomodate the longer length of
the 32 bit octal numbers.
/SYMBOL - Specifies that global symbols and their values should be placed in
the output file. If an optional value is placed on this qualifier,
then a seperate file will be created with only the global symbols
in it. The symbol file will be created in tekhex format unless the
/VLDA option is present, in which case, the output will be in VLDA
format. May not be used with the /RELATIVE option.
/SECTION - Specifies that the section statistics should be placed in the
output file. If a /SYMBOL file is specified, then the section data
will be placed in the symbol file. If a filename is specified on this
quailifer, then a seperate file by that name will be created and
the section statistics will be placed that file. The format will be
tekhex unless the /VLDA option is present, in which case, the output
will be in VLDA format. May not be used with the /RELATIVE option.
/STB - Creates a segment/symbol file that may be used in a later link step.
This file would contain only the resolved globals and located segments.
No code (user data) is placed in this file. (Functionally identical to
a /SYMBOL or /SEGMENT file except that the STB file is suitable to
be used as input to LLF again where the SYMBOL/SEGMENT files may be
TekHex files suitable only for downloading). May not be used with
the /RELATIVE option.
/LIBRARY - Specifies that the preceeding file is a library file. Libraries are
processed in the order that they are encountered. If there are no
undefined globals at the time the library file is processed, then no
modules will be plucked from the library. If one or more modules are
plucked from the library, then the library will be continually
re-processed until no symbols are resolved by any module(s) in the
library.
/WORK - Specifies that work file(s) should be created to hold intermediate
code. Use of this option will severely slow down the procedure but
also reduces the memory required. No particular advantage to using
this qualifier on the VAX, but it may be required on an Atari 520ST.
This option allows for 4 values: 0,1,2 and 3. WORK=0 is the same as
NOWORK. /WORK defaults to WORK=1, which means create a temp file for
the object code, WORK=2 means create a temp file for symbol definitions
(ignored if /RELATIVE also used) and WORK=3 means create a temp
file for both object code and symbol definitions.
/OPTION - Specifies that the preceeding file is an OPTION file. The options
file is an ASCII file that you can use to define global symbols and
locate segments and other specifics. The syntax of the OPTION file
follows and uses basically the same rules as the "C" language in that
white space consists of spaces, tabs and newlines. White space must
seperate names from other names but otherwise is ignored. Comments
can appear on any line and are de-limited with double dashes (--)
or exclamation mark (!) and a newline. The C comment construct of "/*"
and "*/" can also be used. The "case" of any of the keywords is NOT
significant, but the "case" of the segment and global names IS
significant. Numbers are assumed to be decimal unless prefixed with a
pound sign (#) which indicates hexidecimal. The C constant declaration
may also be used. That is constants are assumed to be decimal unless
preceeded with a leading 0, in which case, they are octal or preceeded
with a 0x to indicate hexidecimal. The main keyword (FILE, LOCATE,
etc.) is expected to be the first token on a newline and everything
after the closing parantheses to end of line is discarded. To wit:
FILE ( filename1 filename2 ... ) /* includes file(s) for input */
LIBRARY ( library1 library2 ... ) /* includes library(s) for input */
As with the command input, the default input file types are assumed to
be .OL or .OBJ and the default library file type is .LIB. Filenames
may be delimited with either commas (,) or white space and the files
and libraries are processed in the order in which they are specified
and in the same order as the option file is input in the command
string. For example:
$ LLF one,two/opt,three
where TWO.OPT contains:
FILE (four five)
LIBRARY (six)
FILE (seven)
will cause the files to be processed as "one,two,four,five,six/lib,
seven,three".
LOCATE ( group_name : address_option ; ... ) !position a group or segment
LOCATE ( segment_name ... : address_option ; ... ) !at a specific address
!or range of addresses
Where "group_name" refers to the name of a group and "segment_name"
refers to the name of a segment or section (there's no difference
between a section and a segment). The "address_option" can be one of
the following:
constant [additional_argument(s)]
Where "constant" is assumed to be a number and "additional_arguments"
can be one or more of the following:
TO constant
OUTPUT constant
NAME group_name
The "TO constant" construct instructs LLF to notify you if the
segment(s) you locate won't fit in the area specified. The
"OUTPUT constant" construct allows you to locate the segment(s)
at one address but place the data in a different area in the
output address space. The "NAME" option allows you to name a
group with other than the automatic "noname_xxx" name generator.
Examples:
LOCATE ( DEFAULT_GROUP : #1000 );
LOCATE ( $$one $$two $$three : #0100;
$$four $$five $$six : #0200 TO #02FF;
$code : #8000 TO #DFFF OUTPUT #10000;
$tables1 $tables2 : #0C000 OUTPUT #1C000);
DECLARE ( symbol_name value, ...) !to define a global symbol
Where "symbol_name" is the global symbol you're defining and value
is the value to assign to the symbol. You cannot re-define an already
defined symbol nor can you create a symbol that isn't referenced in
any of the input files. Examples:
DECLARE ( checksum #0123, FIVE 5, TEN 10 )
RESERVE ( address_option ... ) !to reserve an area of memory such that
!no segments will be placed there by the
!automatic placement mechanism.
Where "address_option" is any of the following:
constant /* a specific single location */
BEFORE constant /* all addresses below constant */
AFTER constant /* all addresses above constant */
constant TO constant /* all locations between the 2 constants */
Examples:
RESERVE ( 0 TO #0FFF ) /* 0 to FFF inclusive */
RESERVE ( 0x0630 ) /* location 630 only */
RESERVE ( AFTER 0100000 ) /* 8000-FFFFFFFF inclusive */
RESERVE ( BEFORE #0FFF ) /* 0-FFF inclusive */
Miscellaneous information:
RT-11/RSX object files allow for global symbols and PSECTs to have the same name
and yet treat them differently. The OL format does not distinguish between
global symbol names and segment names. In order to allow both formats to
co-exist, LLF suffixes an underscore on all PSECT names defined in the RT/RSX
object files. In addition, the RT/RSX object files may have unnamed psects (the
default blank program section). LLF renames the "blank" psect as "unnamed_"
(notice that it's lowercase). If you choose to locate specific psects to
specific areas, you'll need to reference them using LLF's naming convention.
Notice also that the use of .ASECT, .PSECT xx,ABS and/or .PSECT xx,BSE may
result in warnings about segments being overlayed. This is because the BSE
section(s) may be overlaying the .ASECT or .PSECT xx,ABS sections.
Output file formats:
Extended TEKhex format is an ASCII record containing one of the following:
%nnTcs...
where: % is the ASCII percent character (record sentinel).
nn- is a 2 hex digit count of the number of bytes in the
record excluding the percent character.
T - is the record type: 3 for symbol, 6 for data and
8 for end of file (termination record will not have
any data).
cs - is a 2 digit hex number representing the sum, mod 256,
of all the characters in the record, except the leading
%, the checksum digits, and the end of line.
In Extended TEKhex, certains fields may vary in length from 2 to 17
characters. This enables data compression by eliminating leading zeroes
from numbers and trailing spaces from symbols. The first character of a
variable length field is the length of the rest of the field. The digit
0 indicates a length of 16 characters. There will be a variable number
of these variable length fields following the checksum and their content
varies according to the record type:
%nn6cslldd... - Data block
ll = 2-9 chars of load address
dd... = n pairs of chars of hex data
%nn8csll - termination record
ll = 2-9 chars of transfer address
%nn3ccvvss... - symbol record
vv = 2-17 chars of section name (LLF always writes 2S_)
ss = n x 5-27 chars of symbol definition:
1 char of symbol type (LLF always outputs an
ASCII 2 = global scalar)
2-17 chars of symbol name
2-9 chars of symbol value (LLF resolves to 32 bits)
VLDA file format is a binary variable length record with no RMS record
attributes. It may or may not contain relocatable code. For preliminary
release (relocatable elements are subject to change), the format of the
absolute output record is:
byte 0 - record type code, =0 for absolute data
1-4 - 4 byte load address (byte 1=lsb, byte 4=msb)
5-n - binary load data
Compute the number of data bytes by subtracting 5 from the record length
returned by RMS. LLF will place TEKhex symbol records including a trailing crlf
into a VLDA record type 13 (decimal) if the /SYM and/or /SEG command qualifiers
are used in conjunction with the /VLDA qualifier.