Re: [cc65] Specifying segment for library code?

From: Oliver Schmidt <ol.sc1web.de>
Date: 2012-06-03 21:29:33
Hi Uz,

> That is correct, but most standard functions don't have constructors. Most
> user programs aren't comparable to Contiki, which aims to be an operating
> system and therefore has another set of library functions in use.

I don't understand what "other set" you are referring to here. However
the functions with constructor issues I referred to before were
standard C library functions. Contiki didn't use constructors by
itself.

> Yes, and exactly this is where this solution differs from the approach
> described by me: If an overlay (and only this overlay) needs strncmp, strncmp
> will get linked to the main program, not to the overlay.

Exactly. I don't disagree by any means. I _did_ however disagree in
that the "single linker session" approach leads to crashing programs
as you described before...

To summarize:

1. Placing library functions in an overlay requires some custom build
"magic" and can cause issues with constructors / destructors.
2. Placing library functions in the main module uses "their" RAM
always - even while they not needed.
3. Placing library functions in an overlay may increase disk usage
because the same functions may be placed in several overlays.

Regards,
Oliver
----------------------------------------------------------------------
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 21:30:13 2012

This archive was generated by hypermail 2.1.8 : 2012-06-03 21:30:16 CEST