]> git.sur5r.net Git - cc65/blob - doc/ar65.sgml
remote TABs in doc/ and test/
[cc65] / doc / ar65.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4 <title>ar65 Users Guide
5 <author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
6
7 <abstract>
8 ar65 is an archiver for object files generated by ca65. It allows to create
9 archives, add or remove modules from archives, and to extract modules from
10 existing archives.
11 </abstract>
12
13 <!-- Table of contents -->
14 <toc>
15
16 <!-- Begin the document -->
17
18 <sect>Overview<p>
19
20
21 ar65 is a replacement for the libr65 archiver that was part of the cc65 C
22 compiler suite developed by John R. Dunning. libr65 had some problems and
23 the copyright does not permit some things which I wanted to be possible,
24 so I decided to write a completely new assembler/linker/archiver suite
25 for the cc65 compiler. ar65 is part of this suite.
26
27 <sect>Usage<p>
28
29
30 The archiver is called as follows:
31
32 <tscreen><verb>
33         Usage: ar65 <operation ...> lib file|module ...
34         Operations are some of:
35                 r       Add modules
36                 d       Delete modules
37                 t       List library table
38                 v       Increase verbosity (put before other operation)
39                 x       Extract modules
40                 V       Print the archiver version
41 </verb></tscreen>
42
43 You may add modules to a library using the <tt/'r'/ command ('a' is deprecated). If the library
44 does not exist, it is created (and a warning message is printed which you
45 may ignore if creation of the library was your intention). You may
46 specify any number of modules on the command line following the library.
47
48 If a module with the same name exists in the library, it is replaced by
49 the new one. The archiver prints a warning, if the module in the library
50 has a newer timestamp than the one to add.
51
52 Here's an example:
53
54 <tscreen><verb>
55         ar65 r mysubs.lib sub1.o sub2.o
56 </verb></tscreen>
57
58 This will add two modules to the library 'mysubs.lib' creating the
59 library if necessary. If the library contains modules named sub1.o or
60 sub2.o, they are replaced by the new ones.
61
62 Modules names in the library are stored without the path, so, using
63
64 <tscreen><verb>
65         ar65 v v r mysubs.lib ofiles/sub1.o ofiles/sub2.o
66 </verb></tscreen>
67
68 will verbose add two modules named 'sub1.o' and 'sub2.o' to the library.
69
70 Deleting modules from a library is done with the <tt/'d'/ command. You may not
71 give a path when naming the modules.
72
73 Example:
74
75 <tscreen><verb>
76         ar65 d mysubs.lib sub1.o
77 </verb></tscreen>
78
79 This will delete the module named 'sub1.o' from the library, printing an
80 error if the library does not contain that module.
81
82
83 The <tt/'t'/ command prints a table of all modules in the library ('l' is deprecated).
84 Any module names on the command line are ignored.
85
86 Example:
87
88 <tscreen><verb>
89         ar65 tv mysubs.lib
90 </verb></tscreen>
91
92
93 Using the <tt/'x'/ command, you may extract modules from the library. The
94 modules named on the command line are extracted from the library and put
95 into the current directory.
96
97 Note: Because of the indexing done by the archiver, the modules may have
98 a changed binary layout, that is, a binary compare with the old module
99 (before importing it into the library) may yield differences. The
100 extracted modules are accepted by the linker and archiver, however, so
101 this is not a problem.
102
103 Example for extracting a module from the library:
104
105 <tscreen><verb>
106         ar65 x mysubs.lib sub1.o
107 </verb></tscreen>
108
109
110 The <tt/'V'/ command prints the version number of the assembler. If you send
111 any suggestions or bugfixes, please include your version number.
112
113 In addition to these operations, the archiver will check for, and warn
114 about duplicate external symbols in the library, every time when an
115 operation does update the library. This is only a warning, the linker
116 will ignore one of the duplicate symbols (which one is unspecified).
117
118
119 <sect>Copyright<p>
120
121 ar65 (and all cc65 binutils) are (C) Copyright 1998-2000 Ullrich von
122 Bassewitz. For usage of the binaries and/or sources the following conditions
123 do apply:
124
125 This software is provided 'as-is', without any expressed or implied
126 warranty.  In no event will the authors be held liable for any damages
127 arising from the use of this software.
128
129 Permission is granted to anyone to use this software for any purpose,
130 including commercial applications, and to alter it and redistribute it
131 freely, subject to the following restrictions:
132
133 <enum>
134 <item>  The origin of this software must not be misrepresented; you must not
135         claim that you wrote the original software. If you use this software
136         in a product, an acknowledgment in the product documentation would be
137         appreciated but is not required.
138 <item>  Altered source versions must be plainly marked as such, and must not
139         be misrepresented as being the original software.
140 <item>  This notice may not be removed or altered from any source
141         distribution.
142 </enum>
143
144 </article>