Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/algol60/src/tools/tld/tld.1 – Rev 2

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
.\" 		 Crown Copyright (c) 1997
2
.\" 
3
.\" This TenDRA(r) Manual Page is subject to Copyright
4
.\" owned by the United Kingdom Secretary of State for Defence
5
.\" acting through the Defence Evaluation and Research Agency
6
.\" (DERA).  It is made available to Recipients with a
7
.\" royalty-free licence for its use, reproduction, transfer
8
.\" to other parties and amendment for any purpose not excluding
9
.\" product development provided that any such use et cetera
10
.\" shall be deemed to be acceptance of the following conditions:-
11
.\" 
12
.\"     (1) Its Recipients shall ensure that this Notice is
13
.\"     reproduced upon any copies or amended versions of it;
14
.\" 
15
.\"     (2) Any amended version of it shall be clearly marked to
16
.\"     show both the nature of and the organisation responsible
17
.\"     for the relevant amendment or amendments;
18
.\" 
19
.\"     (3) Its onward transfer from a recipient to another
20
.\"     party shall be deemed to be that party's acceptance of
21
.\"     these conditions;
22
.\" 
23
.\"     (4) DERA gives no warranty or assurance as to its
24
.\"     quality or suitability for any purpose and DERA accepts
25
.\"     no liability whatsoever in relation to any use to which
26
.\"     it may be put.
27
.\"
28
.TH tld 1
29
.SH NAME
30
tld \- TDF linking and library manipulation utility
31
.SH SYNTAX
32
.B tld
33
[\fImode\fR] [\fIoption\fR]... \fIfile\fR...
34
.SH DESCRIPTION
35
.LP
36
The
37
.B tld
38
command is used to create and manipulate TDF libraries, and to link together
39
TDF capsules.  It has four modes, selected by one of the \fB\-ml\fR (link TDF
40
capsules), \fB\-mc\fR (create TDF library), \fB\-mt\fR (list TDF library
41
contents) or \fB\-mx\fR (extract capsules from TDF library) switches.  If
42
provided, the switch must be the first on the command line.  If one is not
43
provided, the \fB\-ml\fR switch is assumed.
44
.LP
45
The different modes are described below.  In the description, external name
46
definitions are referred to as unique and multiple.  A unique definition is
47
a definition where the defined attribute is set; a multiple definition is
48
one where the multiple attribute is set (i.e. more than one definition is
49
allowed).  A definition may be both multiple and unique (if both bits are
50
set - this means that there is more than definition, but one of them is
51
unique).  It is an error for there to be more than one unique definition of
52
any given name.  It is an error for token external names to have the
53
multiple attribute set.
54
.SH SWITCHES
55
.LP
56
The new version of
57
.B tld
58
accepts both short form and long form command line switches.
59
.LP
60
Short form switches are single characters, and begin with a \&'-' or \&'+'
61
character.  They can be concatenated into a single command line word, e.g.:
62
.IP
63
\fB\-vor\fR \fIoutput-file\fR \fIrename-shape\fR \fIrename-from\fR
64
\fIrename-to\fR
65
.LP
66
which contains three different switches (\fB\-v\fR, which takes no
67
arguments; \fB\-o\fR, which takes one argument: \fIoutput-file\fR; and
68
\fB\-r\fR, which takes three arguments: \fIrename-shape\fR,
69
\fIrename-from\fR, and \fIrename-to\fR).
70
.LP
71
Long form switches are strings, and begin with \&'--' or \&'++'.  With long
72
form switches, only the shortest unique prefix need be entered.  The long
73
form of the above example would be:
74
.IP
75
\fB\-\-version\fR \fB\-\-output\-file\fR \fIoutput-file\fR
76
\fB\-\-rename\fR \fIrename-shape\fR \fIrename-from\fR \fIrename-to\fR
77
.LP
78
In most cases the arguments to the switch should follow the switch as a
79
separate word.  In the case of short form switches, the arguments to the
80
short form switches in a single word should follow the word in the order of
81
the switches (as in the first example).  For some options, the argument may
82
be part of the same word as the switch (such options are shown without a
83
space between the switch and the argument in the switch summaries below).
84
In the case of short form switches, such a switch would terminate any
85
concatenation of switches (either a character would follow it, which would
86
be treated as its argument, or it would be the end of the word, and its
87
argument would follow as normal).
88
.LP
89
For binary switches, the \&'-' or \&'--' switch prefixes set (enable) the
90
switch, and the \&'+' or \&'++' switch prefixes reset (disable) the switch.
91
This is probably back to front, but is in keeping with other programs. The
92
switches \&'--' or \&'++' by themselves terminate option parsing.
93
.SH EXTERNAL NAMES
94
.LP
95
An external name may be either a string or a unique.  A unique is written as
96
.IP
97
\fB[\fIcomponent1\fB.\fIcomponent2\fB.\fR...\fB.\fIcomponentN\fB]\fR
98
.LP
99
Each component of a unique is a string.  A string consists of any sequence
100
of characters, although some special characters must be preceded by a
101
backslash character to stop them being treated specially.  These characters
102
are \&'\fB\\\fR', \&'\fB[\fR', \&'\fB]\fR' and \&'\fB.\fR'.  In addition,
103
the following character sequences are treated the same as they would be in
104
C: \&'\fB\\n\fR', \&'\fB\\r\fR', \&'\fB\\t\fR', \&'\fB\\0\fR'.  Finally, the
105
sequence \&'\fB\\x\fINN\fR' represents the character with code \fINN\fR in
106
hex.
107
.SH RENAME FILE SYNTAX
108
.LP
109
Renaming may be specified either on the command line, or in a file.  The files
110
that specify the renamings to be performed have the following syntax.  The
111
file consists of a number of sections.  Each section begins with a shape
112
name, followed by zero or more pairs of external names (each pair is
113
terminated by a semi-colon).  Shape names are written as a sequence of
114
characters surrounded by single quotes.  Unique names have the same syntax
115
as described above.  String names are a sequence of characters surrounded by
116
double quotes.  The normal backslash escape sequences are supported.  The
117
hash character acts as a comment to end of line character (if this is
118
necessary).
119
.SH UNIT SET FILE SYNTAX
120
.LP
121
The file should consist of a sequence of strings enclosed in double quotes.
122
The backslash character can be used to escape characters.  The following C
123
style escape sequences are recognized: \&'\fB\\n\fR', \&'\fB\\r\fR',
124
\&'\fB\\t\fR', \&'\fB\\0\fR'.  Also, the sequence \&'\fB\\x\fINN\fR'
125
represents the character with code \fINN\fR in hex.  The order of the
126
strings is important, as it specifies the order that the unit sets should be
127
in when read from capsules.  It is necessary to specify the \fItld\fR unit
128
set name.
129
.SH ERROR FILE SYNTAX
130
.LP
131
It is possible to change the error messages that the linker uses.  In order
132
to do this, make the environment variable \fITLD_ERROR_FILE\fR contain the
133
name of a file with the new error messages in.
134
.LP
135
The error file consists of zero or more sections.  Each section begins with
136
a section marker (one of \fB%prefix%\fR, \fB%errors%\fR or \fB%strings%\fR).
137
The prefix section takes a single string (this is to be the prefix for all
138
error messages).  The other sections take zero or more pairs of names and
139
strings.  A name is a sequence of characters surrounded by single quotes.  A
140
string is a sequence of characters surrounded by double quotes.  In the case
141
of the prefix and error sections, the strings may contain variables of the
142
form \fB${\fIvariable name\fB}\fR.  These variables will be replaced by
143
suitable information when the error occurs.  The normal backslash escape
144
sequences are supported.  The hash character acts as a comment to end of
145
line character.
146
.LP
147
The \fB\-\-show\-errors\fR option may be used to get a copy of the current
148
error messages.
149
.SH LINKING
150
.LP
151
In the default mode,
152
.B tld
153
tries to link together the TDF capsules specified on the command line.  This
154
consists of the following stages:
155
.IP 1.
156
All of the external names specified for renaming on the command line are
157
added to the name tables as indirections to their new names.
158
.IP 2.
159
All of the capsules specified on the command line are loaded, and their
160
identifiers are mapped into a per shape namespace.  In these namespaces, all
161
external names of the same shape and with the same name will be mapped to
162
the same identifier.
163
.B tld
164
will report errors about any attempt to link together more than one capsule
165
providing a unique definition for any external name.
166
.IP 3.
167
If any libraries were specified on the command line, then the libraries are
168
loaded to see what definitions they provide.  After loading the libraries,
169
the external names specified for link suppression on the command line are
170
removed from the library index (so that the linker will not attempt to
171
define those names).  Link suppression does not prevent a name from being
172
defined, it just stops the linker trying to define it; a definition for it
173
may still be found from a capsule that is loaded to define another name.
174
.IP
175
Any capsules that provide necessary definitions are loaded.  There must only
176
be one definition for each external name in all of the libraries (in the
177
case of all non-token shapes, this may be either one non-unique definition,
178
or one unique definition with zero or more non-unique definitions; if a
179
unique definition exists, then the non-unique definitions are ignored).
180
.IP 4.
181
If any external names require hiding or keeping (specified by command line
182
switches), then they are hidden at this point.  Hiding means removing the
183
external name from the external name list.  It is illegal to hide undefined
184
external names.  Keeping means keeping an external name in the external name
185
tables.  Keeping a name overrides any attempt to hide that name.
186
.IP 5.
187
A new TDF capsule is created, consisting of all of the input capsules and
188
the necessary library capsules.  Unless specified with the
189
\fB\-\-output\-file\fR switch, the output file will be called
190
\fIcapsule.j\fR.
191
.SH Switches
192
.LP
193
.B tld
194
accepts the following switches in link mode:
195
.LP
196
\fB\-\-all\-hide\-defined\fR
197
.br
198
\fB\-a\fR
199
.IP
200
Hide all external names (of any shape) that are defined.
201
.LP
202
\fB\-\-debug\-file\fR \fIFILE\fR
203
.br
204
\fB\-d\fR \fIFILE\fR
205
.IP
206
Produce a diagnostic trace of the linking process in \fIFILE\fR.
207
.LP
208
\fB\-\-help\fR
209
.br
210
\fB\-?\fR
211
.IP
212
Write an option summary to the standard error.
213
.LP
214
\fB\-\-hide\fR \fISHAPE\fR \fINAME\fR
215
.br
216
\fB\-h\fR \fISHAPE\fR \fINAME\fR
217
.IP
218
Cause the external \fISHAPE\fR name \fINAME\fR to be hidden.  An error is
219
reported if the name is not defined.
220
.LP
221
\fB\-\-hide\-defined\fR \fISHAPE\fR
222
.br
223
\fB\-H\fR \fISHAPE\fR
224
.IP
225
Cause the all external \fISHAPE\fR names that are defined to be hidden.
226
.LP
227
\fB\-\-keep\fR \fISHAPE\fR \fINAME\fR
228
.br
229
\fB\-k\fR \fISHAPE\fR \fINAME\fR
230
.IP
231
Cause the external \fISHAPE\fR name \fINAME\fR to be kept.
232
.LP
233
\fB\-\-keep\-all\fR \fISHAPE\fR
234
.br
235
\fB\-K\fR \fISHAPE\fR
236
.IP
237
Cause the all external \fISHAPE\fR names to be kept.
238
.LP
239
\fB\-\-library\fR \fIFILE\fR
240
.br
241
\fB\-l\fR\fIFILE\fR
242
.IP
243
Use the file \fIFILE\fR as a TDF library.  If the file name contains a \&'/',
244
then it is used as specified; if not, the library search path is searched
245
for a file named \&'\fIFILE\fR.tl'.  Duplicate entries for the same library
246
are ignored.
247
.LP
248
\fB\-\-output\-file\fR \fIFILE\fR
249
.br
250
\fB\-o\fR \fIFILE\fR
251
.IP
252
Write the output capsule to the file \fIFILE\fR.  If this switch is not
253
specified, then the output is written to the file \&'capsule.j' instead.
254
.LP
255
\fB\-\-path\fR \fIDIRECTORY\fR
256
.br
257
\fB\-L\fR\fIDIRECTORY\fR
258
.IP
259
Append the directory \fIDIRECTORY\fR to the library search path.
260
.LP
261
\fB\-\-rename\fR \fISHAPE\fR \fIFROM\fR \fITO\fR
262
.br
263
\fB\-r\fR \fISHAPE\fR \fIFROM\fR \fITO\fR
264
.IP
265
Rename the external \fISHAPE\fR name \fIFROM\fR to \fITO\fR.
266
.LP
267
\fB\-\-rename\-file\fR \fIFILE\fR
268
.br
269
\fB\-R\fR \fIFILE\fR
270
.IP
271
Read the contents of the file \fIFILE\fR as a series of renaming
272
specifications.  The format of the file is described above.
273
.LP
274
\fB\-\-show\-errors\fR
275
.br
276
\fB\-e\fR
277
.IP
278
Write the current error message list to the standard output.
279
.LP
280
\fB\-\-suppress\fR \fISHAPE\fR \fINAME\fR
281
.br
282
\fB\-s\fR \fISHAPE\fR \fINAME\fR
283
.IP
284
Do not try to find a definition for the external \fISHAPE\fR name \fINAME\fR.
285
.LP
286
\fB\-\-suppress\-all\fR \fISHAPE\fR
287
.br
288
\fB\-S\fR \fISHAPE\fR
289
.IP
290
Do not try to find a definition for any external \fISHAPE\fR name.
291
.LP
292
\fB\-\-suppress\-mult\fR
293
.br
294
\fB\-M\fR
295
.IP
296
Do not use non-unique definitions in libraries as definitions for external
297
names.
298
.LP
299
\fB\-\-unit\-file\fR \fIFILE\fR
300
.br
301
\fB\-u\fR \fIFILE\fR
302
.IP
303
Parse \fIFILE\fR to get a new unit set name list.  By default, all of the
304
standard (as specified in the version 4.0 TDF specification) unit set names
305
are known.
306
.LP
307
\fB\-\-version\fR
308
.br
309
\fB\-v\fR
310
.IP
311
Write the version number of the program to the standard error stream.
312
.LP
313
\fB\-\-warnings\fR
314
.br
315
\fB\-w\fR
316
.IP
317
Enable/disable the printing of warning messages.  Warnings are generated for
318
things like obsolete linker information units, and undefined external names.
319
.SH LIBRARY CONSTRUCTION
320
.LP
321
A TDF library is a sequence of named capsules, with an index.  The index
322
indicates which external names are defined by the capsules in the library,
323
and which capsules provide the definitions.  When invoked with the
324
\fB\-mc\fR switch,
325
.B tld
326
produces a library consisting of the TDF capsules specified on the command
327
line.  The library is written to the file \fIlibrary.tl\fR, unless the
328
\fB\-\-output\-file\fR switch is used.
329
.SH Switches
330
.LP
331
.B tld
332
accepts the following switches in library construction mode:
333
.LP
334
\fB\-\-debug\-file\fR \fIFILE\fR
335
.br
336
\fB\-d\fR \fIFILE\fR
337
.IP
338
Produce a diagnostic trace of the library construction process in \fIFILE\fR.
339
.LP
340
\fB\-\-help\fR
341
.br
342
\fB\-?\fR
343
.IP
344
Write an option summary to the standard error.
345
.LP
346
\fB\-\-include\-library\fR \fIFILE\fR
347
.br
348
\fB\-i\fR \fIFILE\fR
349
.IP
350
Include all of the capsules in the TDF library \fIFILE\fR in the library
351
being constructed.  The library name should be a proper file name, not a
352
library abbreviation like the \fB\-\-library\fR switch used by the linking
353
mode.
354
.LP
355
\fB\-\-output\-file\fR \fIFILE\fR
356
.br
357
\fB\-o\fR \fIFILE\fR
358
.IP
359
Write the output library to the file \fIFILE\fR.  If this switch is not
360
specified, then the output is written to the file \&'library.tl' instead.
361
.LP
362
\fB\-\-show\-errors\fR
363
.br
364
\fB\-e\fR
365
.IP
366
Write the current error message list to the standard output.
367
.LP
368
\fB\-\-suppress\fR \fISHAPE\fR \fINAME\fR
369
.br
370
\fB\-s\fR \fISHAPE\fR \fINAME\fR
371
.IP
372
Do not try to find a definition for the external \fISHAPE\fR name \fINAME\fR.
373
.LP
374
\fB\-\-suppress\-all\fR \fISHAPE\fR
375
.br
376
\fB\-S\fR \fISHAPE\fR
377
.IP
378
Do not try to find a definition for any external \fISHAPE\fR name.
379
.LP
380
\fB\-\-suppress\-mult\fR
381
.br
382
\fB\-M\fR
383
.IP
384
Do not use non-unique definitions in libraries as definitions for external
385
names.
386
.LP
387
\fB\-\-unit\-file\fR \fIFILE\fR
388
.br
389
\fB\-u\fR \fIFILE\fR
390
.IP
391
Parse \fIFILE\fR to get a new unit set name list.  By default, all of the
392
standard (as specified in the version 4.0 TDF specification) unit set names
393
are known.
394
.LP
395
\fB\-\-version\fR
396
.br
397
\fB\-v\fR
398
.IP
399
Write the version number of the program to the standard error stream.
400
.SH LIBRARY CONTENTS
401
.LP
402
When invoked with the \fB\-mt\fR switch,
403
.B tld
404
produces a listing of the contents of the TDF library specified on the
405
command line.
406
.SH Switches
407
.LP
408
.B tld
409
accepts the following switches in library contents mode:
410
.LP
411
\fB\-\-debug\-file\fR \fIFILE\fR
412
.br
413
\fB\-d\fR \fIFILE\fR
414
.IP
415
Produce a diagnostic trace of the library contents process in \fIFILE\fR.
416
.LP
417
\fB\-\-help\fR
418
.br
419
\fB\-?\fR
420
.IP
421
Write an option summary to the standard error.
422
.LP
423
\fB\-\-index\fR
424
.br
425
\fB\-i\fR
426
.IP
427
Enable/disable the printing of the index of the library.  If printing of the
428
index is enabled, the index of the library will be printed.  The order of
429
the shapes and external names in the printed index is not necessarily the
430
same as the order of the index in the library itself.  If the order is
431
important, use the \fR\-\-debug\-file\fR option and look at the output that is
432
produced.
433
.LP
434
\fB\-\-show\-errors\fR
435
.br
436
\fB\-e\fR
437
.IP
438
Write the current error message list to the standard output.
439
.LP
440
\fB\-\-size\fR
441
.br
442
\fB\-s\fR
443
.IP
444
Enable/disable the printing of the size of each capsule in the library.  If
445
enabled, the size of each capsule in bytes is printed after its name.
446
.LP
447
\fB\-\-version\fR
448
.br
449
\fB\-v\fR
450
.IP
451
Write the version number of the program to the standard error stream.
452
.SH LIBRARY EXTRACTION
453
.LP
454
When invoked with the \fB\-mx\fR switch,
455
.B tld
456
extracts capsules from the TDF library specified as the first file on the
457
command line.  The names of the capsules to extract should follow the
458
library name.  If capsule names are specified, they must match exactly the
459
names of the capsules in the library (use the \fB\-mt\fR mode switch to find
460
out what the exact names are).  The capsules are normally extracted relative
461
to the current directory, using the name of the capsule as the output file
462
name.  The linker will try to create any directories on the extracted
463
capsule's path name (in some implementations of the linker this may not be
464
supported, in which case the directories will need to be created manually
465
before extraction).  The extracted capsules will overwrite existing files of
466
the same name.
467
.SH Switches
468
.LP
469
.B tld
470
accepts the following switches in library extraction mode:
471
.LP
472
\fB\-\-all\fR
473
.br
474
\fB\-a\fR
475
.IP
476
Enable/disable the extraction of all capsules.  If all capsules are to be
477
extracted, no capsule names should be specified on the command line.
478
.LP
479
\fB\-\-basename\fR
480
.br
481
\fB\-b\fR
482
.IP
483
Enable/disable the use of the basename of each capsule when extracting.  If
484
this is enabled, then extracted capsules are extracted into the current
485
directory, using just their basename.  This may cause some of the capsules
486
to be written on top of each other.
487
.LP
488
\fB\-\-debug\-file\fR \fIFILE\fR
489
.br
490
\fB\-d\fR \fIFILE\fR
491
.IP
492
Produce a diagnostic trace of the library extraction process in \fIFILE\fR.
493
.LP
494
\fB\-\-help\fR
495
.br
496
\fB\-?\fR
497
.IP
498
Write an option summary to the standard error.
499
.LP
500
\fB\-\-info\fR
501
.br
502
\fB\-i\fR
503
.IP
504
Enable/disable informational messages.  These say which capsules are being
505
extracted.
506
.LP
507
\fB\-\-match\-basename\fR
508
.br
509
\fB\-m\fR
510
.IP
511
Enable/disable matching of capsule names by basename.  If enabled, then the
512
basename of each library capsule is also matched against the file names
513
specified.  This may result in more than one capsule being extracted for one
514
file name.
515
.LP
516
\fB\-\-show\-errors\fR
517
.br
518
\fB\-e\fR
519
.IP
520
Write the current error message list to the standard output.
521
.LP
522
\fB\-\-version\fR
523
.br
524
\fB\-v\fR
525
.IP
526
Write the version number of the program to the standard error stream.
527
.SH SEE ALSO
528
.LP
529
tcc(1).