]> git.sur5r.net Git - cc65/blob - doc/ar65.txt
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / doc / ar65.txt
1
2
3                                    ar65
4
5               An Archiver for Object Files Generated by ca65
6
7                (C) Copyright 1998-1999 Ullrich von Bassewitz
8                             (uz@musoftware.de)
9
10
11
12 Contents
13 --------
14
15   1. Overview
16
17   2. Usage
18
19   3. Bugs/Feedback
20
21   4. Copyright
22
23
24
25 1. Overview
26 -----------
27
28 ar65 is a replacement for the libr65 archiver that was part of the cc65 C
29 compiler suite developed by John R. Dunning. libr65 had some problems and
30 the copyright does not permit some things which I wanted to be possible,
31 so I decided to write a completely new assembler/linker/archiver suite
32 for the cc65 compiler. ar65 is part of this suite.
33
34
35
36 2. Usage
37 --------
38
39 The archiver is called as follows:
40
41         Usage: ar65 <operation> lib file|module ...
42         Operation is one of:
43                 a       Add modules
44                 d       Delete modules
45                 l       List library contents
46                 x       Extract modules
47                 X       Print the archiver version
48
49
50 You may add modules to a library using the `a' command. If the library
51 does not exist, it is created (and a warning message is printed which you
52 may ignore if creation of the library was your intention). You may
53 specify any number of modules on the command line following the library.
54
55 If a module with the same name exists in the library, it is replaced by
56 the new one. The archiver prints a warning, if the module in the library
57 has a newer timestamp than the one to add.
58
59 Here's an example:
60
61         ar65 a mysubs.lib sub1.o sub2.o
62
63 This will add two modules to the library `mysubs.lib' creating the
64 library if necessary. If the library contains modules named sub1.o or
65 sub2.o, they are replaced by the new ones.
66
67 Modules names in the library are stored without the path, so, using
68
69         ar65 a mysubs.lib ofiles/sub1.o ofiles/sub2.o
70
71 will add two modules named `sub1.o' and `sub2.o' to the library.
72
73
74 Deleting modules from a library is done with the `d' command. You may not
75 give a path when naming the modules.
76
77 Example:
78
79         ar65 d mysubs.lib sub1.o
80
81 This will delete the module named `sub1.o' from the library, printing an
82 error if the library does not contain that module.
83
84
85 The `l' command prints a list of all modules in the library. Any module
86 names on the command line are ignored.
87
88 Example:
89
90         ar65 l mysubs.lib
91
92
93 Using the `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         ar65 x mysubs.lib sub1.o
106
107
108 The `V' command prints the version number of the assembler. If you send
109 any suggestions or bugfixes, please include your version number.
110
111 In addition to these operations, the archiver will check for, and warn
112 about duplicate external symbols in the library, every time when an
113 operation does update the library. This is only a warning, the linker
114 will ignore one of the duplicate symbols (which one is unspecified).
115
116
117
118 3. Bugs/Feedback
119 ----------------
120
121 If you have problems using the archiver, if you find any bugs, or if
122 you're doing something interesting with it, I would be glad to hear from
123 you. Feel free to contact me by email (uz@musoftware.de).
124
125
126
127 4. Copyright
128 ------------
129
130 ar65 (and all cc65 binutils) are (C) Copyright 1998 Ullrich von Bassewitz.
131 For usage of the binaries and/or sources the following conditions do
132 apply:
133
134 This software is provided 'as-is', without any expressed or implied
135 warranty.  In no event will the authors be held liable for any damages
136 arising from the use of this software.
137
138 Permission is granted to anyone to use this software for any purpose,
139 including commercial applications, and to alter it and redistribute it
140 freely, subject to the following restrictions:
141
142 1. The origin of this software must not be misrepresented; you must not
143    claim that you wrote the original software. If you use this software
144    in a product, an acknowledgment in the product documentation would be
145    appreciated but is not required.
146 2. Altered source versions must be plainly marked as such, and must not
147    be misrepresented as being the original software.
148 3. This notice may not be removed or altered from any source
149    distribution.
150
151
152