Re: [cc65] linking to o65

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-01-19 15:52:59
Hi!

On Thu, Jan 19, 2012 at 09:48:35AM +0100, Gábor Lénárt wrote:
> * I want to link into o65 object format rather than a "ready-to-run" prg.
> * I have some undefined symbol, which should be not a problem: the
>   software which loads the o65 (as from external file, from disk, for
>   example) would provide the missing information (common routines referenced
>   by my programs would be implemented by the "loader")
> * Can I set up some o65 specific header information (cpu type, alignment,
>   object type, ? If not, it's maybe possible that I write an utility which
>   "modifies" the o65 generated by cc65, but it's not so elegant anyway.
>
> It's not clear for me currently, how I should do this, can someone help?

ld65 is mostly tailored for generating o65 executables, not o65 object files.
You didn't specify which type you're targeting. And, it is tested mostly with
cc65 modules. So while there is some support for other output, it is rarely
used and may therefore be untested/non working.

Regarding imports: Specifying the o65 imports in the linker config allows the
linker to do error checking. Treating every unknown symbol as import might be
possible but delays the error to the point where the executable is run.
There's also a reason not to rely on imports: The string table for the names
of the symbols may get rather big. This is the reason why loadable drivers
(which a in o65 format) use a jump table instead of imports by name.

Header information (apart from 16/32 bit which is small/large in the config)
can currently not be set. The functions are there, but there are no matching
attributes in the config file.

So as a summary: The currently available features are probably not enough for
what you want to do. Most of them can be easily added. But since o65 usage has
been rare, I would prefer to add just the things that are really necessary.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Jan 19 15:53:16 2012

This archive was generated by hypermail 2.1.8 : 2012-01-19 15:53:20 CET