[cc65] linking to o65

From: Gábor Lénárt <lgb1lgb.hu>
Date: 2012-01-19 09:48:35
Hi,

I have many c and asm sources, compiled/assembled into the object format of
the cc65 package. With ld65 I would be able to link as a prg file for sure.
However:

* 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?

As far as I can see, there is the lunix target of ld65 which something like
this, however should I always define imports in linker cfg files? Since I
don't know which syms are referenced by the loaded code, so I would like to
automatically import all of the undefined stuff, and my loader can "tell" if
it can resolve those or not. However if it won't work I will stick with
importing all of the possible syms (btw, I have even the idea to provide
cc65 internals by the loader: the goal that the loaded "program" should be
as small as possible, and any "common" code by various cc65 compiled
programs should be implemented by the loader: the loaded o65 should only
contain the user code, not hw/os/compiler/etc specific ones).

Thanks a lot in advance,

- Gábor
----------------------------------------------------------------------
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 09:48:48 2012

This archive was generated by hypermail 2.1.8 : 2012-01-19 09:48:51 CET