[Top] [All Lists]

Re: [Q: Linux/SGI] IRIX executable memory map.

To: Miguel de Icaza <>
Subject: Re: [Q: Linux/SGI] IRIX executable memory map.
From: "William J. Earl" <>
Date: Fri, 5 Sep 1997 15:51:00 -0700
In-reply-to: <>
References: <>
Miguel de Icaza writes:
 > Hello guys,
 >     Ok, it seems our irix_elfmap routine is just fine, I just found
 > out with a simple test case that the code is trying to access memory
 > from the location at 0x200000 which is making my IRIX executables
 > crash (this one is crashing inside usinit ()).
 >     Is there something magic about 0x20000 on IRIX that I should be
 > aware of? 

     0x20000 (not 0x200000) is automatically mapped in a process
by the kernel when referenced.  See <sys/prctl.h> on IRIX for
the definitions.  Most of the fields you can probably ignore,
but you should set t_pid, t_rpid, and t_prid (where the latter is the value
of the $prid COP0 register).  Set t_pid and t_rpid to the pid of the process.
(They cannot really be different in IRIX.)

     The library is fetching the PID from t_pid instead of calling getpid()
for performance reasons.

     Simply automatically create the page in the page fault handler
when it is first referenced.  Treat as if it were an mmap() of /dev/zero
for 1 page.

<Prev in Thread] Current Thread [Next in Thread>