Re: [cc65] RODATA strings

From: Groepaz <groepaz1gmx.net>
Date: 2009-12-06 19:19:34
On Sonntag 06 Dezember 2009, Ullrich von Bassewitz wrote:
> 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.

mmmh. merging of duplicates isnt so important when renaming the rodata segment 
i think.... since typically you do that when working with overlays, and you 
dont want to merge strings from different overlays at all :)

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

...the best way to prepare [to be a programmer] is to write programs, and to 
study great programs that other people have written. In my case, I went to 
the garbage cans at the Computer Science Center and fished out listings of 
their operating system. 
<Bill Gates>

----------------------------------------------------------------------
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 19:19:03 2009

This archive was generated by hypermail 2.1.8 : 2009-12-06 19:19:05 CET