Re: [cc65] RODATA strings

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-12-06 08:59:07
On Sun, Dec 06, 2009 at 06:39:16AM +0100, Groepaz wrote:
> i recently stumbled about that after
>
> #pragma rodata-name (push,"MENUOVLRODATA")
> ...
> cputs("foo");
>
> the "foo" string would not actually end up in the rodata segment i defined,
> but in the regular one. could that be fixed too ? :)

That's difficult to achieve. If the compiler delays the output of the strings
until end of compile in the hope that some of them can be merged, they will go
into the rodata segment that is active at that time. Remembering not only the
writable-strings setting, but also the name of the segment that was active at
that point of compilation and finally doing the merge considering also the
segment names is an additional effort probably not worth the trouble.

What I can offer is a command line option that causes literals to be output
immediately in the local data segment of the function. This would allow
honouring the segment #pragmas, but switch off merging of duplicates.

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 Dec 6 08:59:16 2009

This archive was generated by hypermail 2.1.8 : 2009-12-06 08:59:18 CET