Re: [cc65] Question about ca65 object files

Date view Thread view Subject view

From: Ullrich von Bassewitz (
Date: 2000-06-23 16:41:42

On Fri, Jun 23, 2000 at 09:36:35AM -0500, David Lloyd wrote:
> Where can I find the format for the object files generated by ca65?  I
> specifically want to be able to calculate the number of bytes used by
> certain segments, *before* they are relocated and linked.
> Is this even possible?  Thanks...

It would be possible using the source as documentation. However, I would
suggest, not to use the object files directly. The format is quite flexible
and has changed several times (usually it was extended to incorporate new
features like debug info).

If you access the object files directly, you will have to change your code
each time, the format changes.

I'm not sure why you want to calculate the number of bytes in certain segments
before the link stage, but why not use a special linker config that dumps the
output into the null device, and get the numbers from the map file?

I have also thought about an object file dump utility as part of the compiler
suite, but it is not yet written and I cannot tell if it ever will.



Ullrich von Bassewitz                        

---------------------------------------------------------------------- To unsubscribe from the list send mail to with the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:36 CET