PCH support on Solaris
Eric Botcazou
ebotcazou@libertysurf.fr
Fri Apr 4 10:16:00 GMT 2003
> Will it work to simply do
>
> addr = mmap (mmi.preferred_base - mmi.offset, mmi.size, PROT_READ,
> MAP_PRIVATE fd, mmi.offset);
>
> on Solaris? Or will preferred_base need to have mmi.offset added into
> it when generating the PCH?
The former solution appears to work (all pch tests pass) but it is obvioulsy
fragile.
I've also tested Paolo's solution (patch attached) and it appears to work
too.
So I propose to implement a 3-stage heuristics:
- direct heuristics: (mmi.preferred_base, mmi.offset),
- Solaris-specific heuristics: (mmi.preferred_base - mmi.offset, mmi.offset)
- MAP_FIXED heuristics: (mmi.preferred_base, 0) then (mmi.preferred_base,
mmi.offset) with MAP_FIXED.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: solaris-pch.diff
Type: text/x-diff
Size: 3046 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030404/40372a31/attachment.bin>
More information about the Gcc-patches
mailing list