]> git.sur5r.net Git - cc65/blob - doc/od65.sgml
Fix order of command line arguments: -o should precede -C or -t.
[cc65] / doc / od65.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4 <title>od65 Users Guide
5 <author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
6 <date>2010-07-30
7
8 <abstract>
9 od65 is the object file dump utility. It is able to output most parts of
10 <htmlurl url="ca65.html" name="ca65"> generated object files in readable form.
11 </abstract>
12
13 <!-- Table of contents -->
14 <toc>
15
16 <!-- Begin the document -->
17
18
19 <sect>Overview<p>
20
21 od65 is an object file dump utility. It is able to output most parts of
22 <htmlurl url="ca65.html" name="ca65"> generated object files in readable form.
23 Since the contents and format of the object files are not documented
24 elsewhere and may change at any time, this tool is a portable way to look at
25 the contents.
26
27 Apart from curiosity, most people don't need to use this tool.
28
29
30
31 <sect>Usage<p>
32
33 The od65 utility dumps contents of one or more ca65 generated object file to
34 standard output. It has no cross-version compatibility, so you have to use
35 a version that matches the version of ca65 used to create the object files.
36
37
38 <sect1>Command line option overview<p>
39
40 The program may be called as follows:
41
42 <tscreen><verb>
43 ---------------------------------------------------------------------------
44 Usage: od65 [options] file [options] [file]
45 Short options:
46   -h                    Help (this text)
47   -H                    Dump the object file header
48   -S                    Dump segments sizes
49   -V                    Print the version number and exit
50
51 Long options:
52   --dump-all            Dump all object file information
53   --dump-dbgsyms        Dump debug symbols
54   --dump-exports        Dump exported symbols
55   --dump-files          Dump the source files
56   --dump-header         Dump the object file header
57   --dump-imports        Dump imported symbols
58   --dump-lineinfo       Dump line information
59   --dump-options        Dump object file options
60   --dump-segments       Dump the segments in the file
61   --dump-segsize        Dump segments sizes
62   --help                Help (this text)
63   --version             Print the version number and exit
64 ---------------------------------------------------------------------------
65 </verb></tscreen>
66
67
68 <sect1>Command line options in detail<p>
69
70 Here is a description of all the command line options:
71
72 <descrip>
73
74   <tag><tt>--dump-all</tt></tag>
75
76   This will output all information, od65 is able to process. The option is a 
77   shortcut for specifying all the other <tt/--dump/ options.
78
79
80   <tag><tt>--dump-dbgsyms</tt></tag>
81
82   Dump all debug symbols contained in the object file.
83
84
85   <tag><tt>--dump-exports</tt></tag>
86
87   Dump all exported symbols contained in the object file.
88
89
90   <tag><tt>--dump-files</tt></tag>
91
92   Dump the file table contained in the object file.
93
94
95   <tag><tt>-H, --dump-header</tt></tag>
96
97   Dump the object file header.
98
99
100   <tag><tt>--dump-imports</tt></tag>
101
102   Dump the list of imported symbols contained in the object file.
103
104
105   <tag><tt>--dump-segments</tt></tag>
106
107   Dump the list of segments contained in the object file.
108
109
110   <tag><tt>-S, --dump-segsize</tt></tag>
111
112   Dump the sizes of all segments contained in the object file. This option is
113   quite useful to determine the effect of measures that increase or decrease
114   code size.
115
116
117   <tag><tt>-h, --help</tt></tag>
118
119   Print the short option summary shown above.
120
121
122   <tag><tt>-V, --version</tt></tag>
123
124   Print the version number of the compiler. When submitting a bug report,
125   please include the operating system you're using, and the compiler
126   version.
127 </descrip>
128
129
130 <sect>Input and output<p>
131
132 The converter will read one or more object files per invocation and write the
133 contents in readable format to standard output. Please note that you need to
134 specify and of the <tt/--dump/ options listed above, otherwise no useful
135 output will be generated.
136
137 Example output for the command
138 <tscreen><verb>
139 od65 --dump-header --dump-files t.o
140 </verb></tscreen>
141 <tscreen><verb>
142 t.o:
143   Header:
144     Magic:                 0x616E7A55
145     Version:                       12
146     Flags:                     0x0001  (OBJ_FLAGS_DBGINFO)
147     Options:
148       Offset:                      88
149       Size:                         9
150     Files:
151       Offset:                      97
152       Size:                        10
153     Segments:
154       Offset:                     107
155       Size:                       101
156     Imports:
157       Offset:                     208
158       Size:                         1
159     Exports:
160       Offset:                     209
161       Size:                         1
162     Debug symbols:
163       Offset:                     210
164       Size:                        55
165     Line infos:
166       Offset:                     265
167       Size:                         1
168     String pool:
169       Offset:                     266
170       Size:                        80
171   Files:
172     Count:                          1
173     Index:                          0
174       Name:                     "t.s"
175       Size:                       402
176       Modification time:   1280498435  (Fri Jul 30 16:00:35 2010)
177 </verb></tscreen>
178
179
180 <sect>Bugs/Feedback<p>
181
182 If you have problems using the converter, if you find any bugs, or if you're
183 doing something interesting with the code, I would be glad to hear from you.
184 Feel free to contact me by email (<htmlurl url="mailto:uz@cc65.org"
185 name="uz@cc65.org">).
186
187
188
189 <sect>Copyright<p>
190
191 od65 is (C) Copyright 2000-2009, Ullrich von Bassewitz. For usage of the
192 binaries and/or sources the following conditions apply:
193
194 This software is provided 'as-is', without any expressed or implied
195 warranty.  In no event will the authors be held liable for any damages
196 arising from the use of this software.
197
198 Permission is granted to anyone to use this software for any purpose,
199 including commercial applications, and to alter it and redistribute it
200 freely, subject to the following restrictions:
201
202 <enum>
203 <item>  The origin of this software must not be misrepresented; you must not
204         claim that you wrote the original software. If you use this software
205         in a product, an acknowledgment in the product documentation would be
206         appreciated but is not required.
207 <item>  Altered source versions must be plainly marked as such, and must not
208         be misrepresented as being the original software.
209 <item>  This notice may not be removed or altered from any source
210         distribution.
211 </enum>
212
213 </article>
214