cvs commit: fptools/ghc/driver/mangler ghc-asm.lprl
Wolfgang Thaller
wolfgang.thaller at gmx.net
Wed Jan 19 22:04:23 EST 2005
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--?
Cheers,
Wolfgang
More information about the Cvs-ghc
mailing list