# od65 Users Guide

## Ullrich von Bassewitz

od65 is the object file dump utility. It is able to output most parts of ca65-generated object files in readable form.

## 1. Overview

## 2. Usage

- 2.1 Command line option overview
- 2.2 Command line options in detail

## 3. Input and output

## 4. Copyright

## 1. Overview

od65 is an object file dump utility. It is able to output most parts of ca65-generated object files in readable form. Since the contents and format of the object files are not documented elsewhere and may change at any time, this tool is a portable way to look at the contents.

Apart from curiosity, most people don't need to use this tool.

## 2. Usage

The od65 utility dumps contents of one or more ca65 generated object file to standard output. It has no cross-version compatibility, so you have to use a version that matches the version of ca65 used to create the object files.

## 2.1 Command line option overview

The program may be called as follows:

> `

>     ---------------------------------------------------------------------------
>     Usage: od65 [options] file [options] [file]
>     Short options:
>       -h                    Help (this text)
>       -H                    Dump the object file header
>       -S                    Dump segments sizes
>       -V                    Print the version number and exit

>     Long options:
>       --dump-all            Dump all object file information
>       --dump-dbgsyms        Dump debug symbols
>       --dump-exports        Dump exported symbols
>       --dump-files          Dump the source files
>       --dump-header         Dump the object file header
>       --dump-imports        Dump imported symbols
>       --dump-lineinfo       Dump line information
>       --dump-options        Dump object file options
>       --dump-segments       Dump the segments in the file
>       --dump-segsize        Dump segments sizes
>       --help                Help (this text)
>       --version             Print the version number and exit
>     ---------------------------------------------------------------------------

> `

## 2.2 Command line options in detail

Here is a description of all the command line options:

`--dump-all`

  This will output all information, od65 is able to process. The option is a shortcut for specifying all the other `--dump` options.

`--dump-dbgsyms`

  Dump all debug symbols contained in the object file.

`--dump-exports`

  Dump all exported symbols contained in the object file.

`--dump-files`

  Dump the file table contained in the object file.

`-H, --dump-header`

  Dump the object file header.

`--dump-imports`

  Dump the list of imported symbols contained in the object file.

`--dump-lineinfo`

  Dump the line info contained in the object file.

`--dump-segments`

  Dump the list of segments contained in the object file.

`--dump-scopes`

  Dump the scope (lexical level) information contained in the object file.

`-S, --dump-segsize`

  Dump the sizes of all segments contained in the object file. This option is quite useful to determine the effect of measures that increase or decrease code size.

`-h, --help`

  Print the short option summary shown above.

`-V, --version`

  Print the version number of the compiler. When submitting a bug report, please include the operating system you're using, and the compiler version.

## 3. Input and output

The converter will read one or more object files per invocation and write the contents in readable format to standard output. Please note that you need to specify any of the `--dump` options listed above, otherwise no useful output will be generated.

Example output for the command

> `

>     od65 --dump-header --dump-files t.o

> `

> `

>     t.o:
>       Header:
>         Magic:                 0x616E7A55
>         Version:                       12
>         Flags:                     0x0001  (OBJ_FLAGS_DBGINFO)
>         Options:
>           Offset:                      88
>           Size:                         9
>         Files:
>           Offset:                      97
>           Size:                        10
>         Segments:
>           Offset:                     107
>           Size:                       101
>         Imports:
>           Offset:                     208
>           Size:                         1
>         Exports:
>           Offset:                     209
>           Size:                         1
>         Debug symbols:
>           Offset:                     210
>           Size:                        55
>         Line infos:
>           Offset:                     265
>           Size:                         1
>         String pool:
>           Offset:                     266
>           Size:                        80
>       Files:
>         Count:                          1
>         Index:                          0
>           Name:                     "t.s"
>           Size:                       402
>           Modification time:   1280498435  (Fri Jul 30 16:00:35 2010)

> `

## 4. Copyright

od65 is (C) Copyright 2000-2009, Ullrich von Bassewitz. For usage of the binaries and/or sources the following conditions apply:

This software is provided 'as-is', without any expressed or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.