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