Re: [cc65] Specifying segment for library code?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-06-03 00:22:46
On Sat, Jun 02, 2012 at 10:55:05PM +0200, Oliver Schmidt wrote:
> > That is possible with an intermediate step. Use the linker to create your main
> > program. Use some perl magic to retrieve all identifiers from the map file and
> > generate an asm file with "name := value" pairs. Then assemble and link this
> > object file to the overlays. As a result, the overlays will use functions in
> > the main program, if they are already there, and have their own copies of
> > everything else.
>
> As far as I understand that approach would link strncmp into the main
> program and allow to use it from the overlay _too_. The question here
> was to have it linked into the overlay _only_.

No. If the function is in the main module, the overlays will use that one. If
it is not, the linker will link the library function to the overlay(s).

> The (more usual) scenario of linking all library stuff needed by any
> overlay into main can easily archived by by linking the main and all
> overlays in one single linker "session" as shown in the overlay sample
> contained in the last cc65 release

That may be a common scenario, but as far as I understand it it is different
from what he asked for.

> (but not the present in the current snapshot !).

Why that? Anything I should know but don't remember?

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 Sun Jun 3 00:22:55 2012

This archive was generated by hypermail 2.1.8 : 2012-06-03 00:22:58 CEST