]> git.sur5r.net Git - cc65/blob - doc/od65.sgml
remote TABs in doc/ and test/
[cc65] / doc / od65.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4 <title>od65 Users Guide
5 <author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
6
7 <abstract>
8 od65 is the object file dump utility. It is able to output most parts of
9 <htmlurl url="ca65.html" name="ca65-generated"> object files in readable form.
10 </abstract>
11
12 <!-- Table of contents -->
13 <toc>
14
15 <!-- Begin the document -->
16
17
18 <sect>Overview<p>
19
20 od65 is an object file dump utility. It is able to output most parts of
21 <htmlurl url="ca65.html" name="ca65-generated"> object files in readable form.
22 Since the contents and format of the object files are not documented
23 elsewhere and may change at any time, this tool is a portable way to look at
24 the contents.
25
26 Apart from curiosity, most people don't need to use this tool.
27
28
29
30 <sect>Usage<p>
31
32 The od65 utility dumps contents of one or more ca65 generated object file to
33 standard output. It has no cross-version compatibility, so you have to use
34 a version that matches the version of ca65 used to create the object files.
35
36
37 <sect1>Command line option overview<p>
38
39 The program may be called as follows:
40
41 <tscreen><verb>
42 ---------------------------------------------------------------------------
43 Usage: od65 [options] file [options] [file]
44 Short options:
45   -h                    Help (this text)
46   -H                    Dump the object file header
47   -S                    Dump segments sizes
48   -V                    Print the version number and exit
49
50 Long options:
51   --dump-all            Dump all object file information
52   --dump-dbgsyms        Dump debug symbols
53   --dump-exports        Dump exported symbols
54   --dump-files          Dump the source files
55   --dump-header         Dump the object file header
56   --dump-imports        Dump imported symbols
57   --dump-lineinfo       Dump line information
58   --dump-options        Dump object file options
59   --dump-segments       Dump the segments in the file
60   --dump-segsize        Dump segments sizes
61   --help                Help (this text)
62   --version             Print the version number and exit
63 ---------------------------------------------------------------------------
64 </verb></tscreen>
65
66
67 <sect1>Command line options in detail<label id="cmdline-opt-detail"><p>
68
69 Here is a description of all the command line options:
70
71 <descrip>
72
73   <tag><tt>--dump-all</tt></tag>
74
75   This will output all information, od65 is able to process. The option is a
76   shortcut for specifying all the other <tt/--dump/ options.
77
78
79   <tag><tt>--dump-dbgsyms</tt></tag>
80
81   Dump all debug symbols contained in the object file.
82
83
84   <tag><tt>--dump-exports</tt></tag>
85
86   Dump all exported symbols contained in the object file.
87
88
89   <tag><tt>--dump-files</tt></tag>
90
91   Dump the file table contained in the object file.
92
93
94   <tag><tt>-H, --dump-header</tt></tag>
95
96   Dump the object file header.
97
98
99   <tag><tt>--dump-imports</tt></tag>
100
101   Dump the list of imported symbols contained in the object file.
102
103
104   <tag><tt>--dump-lineinfo</tt></tag>
105
106   Dump the line info contained in the object file.
107
108
109   <tag><tt>--dump-segments</tt></tag>
110
111   Dump the list of segments contained in the object file.
112
113
114   <tag><tt>--dump-scopes</tt></tag>
115
116   Dump the scope (lexical level) information contained in the object file.
117
118
119   <tag><tt>-S, --dump-segsize</tt></tag>
120
121   Dump the sizes of all segments contained in the object file. This option is
122   quite useful to determine the effect of measures that increase or decrease
123   code size.
124
125
126   <tag><tt>-h, --help</tt></tag>
127
128   Print the short option summary shown above.
129
130
131   <tag><tt>-V, --version</tt></tag>
132
133   Print the version number of the compiler. When submitting a bug report,
134   please include the operating system you're using, and the compiler
135   version.
136 </descrip>
137
138
139 <sect>Input and output<p>
140
141 The converter will read one or more object files per invocation and write the
142 contents in readable format to standard output. Please note that you need to
143 specify any of the <tt/--dump/ options listed <ref id="cmdline-opt-detail"
144 name="above">, otherwise no useful output will be generated.
145
146 Example output for the command
147 <tscreen><verb>
148 od65 --dump-header --dump-files t.o
149 </verb></tscreen>
150 <tscreen><verb>
151 t.o:
152   Header:
153     Magic:                 0x616E7A55
154     Version:                       12
155     Flags:                     0x0001  (OBJ_FLAGS_DBGINFO)
156     Options:
157       Offset:                      88
158       Size:                         9
159     Files:
160       Offset:                      97
161       Size:                        10
162     Segments:
163       Offset:                     107
164       Size:                       101
165     Imports:
166       Offset:                     208
167       Size:                         1
168     Exports:
169       Offset:                     209
170       Size:                         1
171     Debug symbols:
172       Offset:                     210
173       Size:                        55
174     Line infos:
175       Offset:                     265
176       Size:                         1
177     String pool:
178       Offset:                     266
179       Size:                        80
180   Files:
181     Count:                          1
182     Index:                          0
183       Name:                     "t.s"
184       Size:                       402
185       Modification time:   1280498435  (Fri Jul 30 16:00:35 2010)
186 </verb></tscreen>
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>