On 20 January 2005 03:04, Wolfgang Thaller wrote:
> Ryan Lortie wrote:
>
>> You probably shouldn't have relocations being performed on rodata
>> either since they'll probably be mixed in with a whole whack of data
>> that is otherwise (by virtue of being read-only) not copy-on-written.
>>
>> They should probably go in static storage or even some special
>> section for just this purpose (although, if this is meant for all
>> platforms then that might be a problem because I'm not totally sure
>> all object formats support arbitrarily-named sections...)
>
> That is entirely correct. This should be a temporary hack only.
> In addition to read-only data and regular initialised data, we need
> initialised data which is likely to stay constant after relocation. On
> Darwin, those sections are ".const", ".data" and ".const_data".
> On Linux and related OSes, we have ".section .rodata" and ".data" -
> where should "relocated read-only data" go?
>
> As far as the NCG is concerned - would it be OK to add
> "RelocatableReadOnlyData" or sth like that to the Section datatype in
> cmm/Cmm.hs? Or is that something which should be kept in sync with
> real C--?
That should be fine - so we'd used .data if there was no appropriate
section to use on the current platform?
C-- doesn't constrain the list of possible sections, it accepts plain
strings and passes them down literally to the assembly code.
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc