This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: precompiled header support


Gunther Nikl <gni@gecko.de> writes:

>   What is "fixed for a particular instance of cc1"? That the address is
>   always the same for a specific cc1 but might be different with another
>   cc1? However, that doesn't really matter in this case.

Yes, that is what I mean: the address is always the same for a
specific cc1.

>   Both approaches don't work with "my" host since the OS always loads
>   executables to random addresses. This is by design to not require a MMU.
>   An executable might have an relocation table if necessary to allow the
>   loader to adapt the program for the real address in memory.

That's a tough one.  Are the addresses truly random across the whole
memory space?  Is there any area of memory which you can reasonably
expect will not contain any code?  If not, then I don't think PCH will
work for you.  Tell Geoff Keating--he has argued that every system has
some address available.

>   Generating a precompiled header works :) Using it doesn't work. If I am
>   lucky I get "text segment moved". If I am not lucky the compiler crashes.
>   What I am after is: I want prevent other users on that host (if any) to
>   use a feature that doesn't work. I suppose they would try it regardless
>   of what documentation states.

Create a host-amiga.c file, mention it in config.host, and define
HOST_HOOKS_GT_PCH_GET_ADDRESS to a function which simply calls
error().  See config/host-linux.c for an example of a working host
file.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]