From: user5857@newsgrouper.org.invalid   
      
   BGB posted:   
      
   > On 8/30/2025 1:22 PM, Stefan Monnier wrote:   
   > >> Function pointer consists of a pointer to a blob of memory holding   
   > >> a code pointer and typically the callee's GOT pointer.   
   > >   
   > > Better skip the redirection and make function pointers take up 2 words   
   > > (address of the code plus address of the context/environment/GOT), so   
   > > there's no dynamic allocation involved.   
   > >   
   >   
   > FDPIC typically always uses the normal pointer width, just with more   
   > indirection:   
   > Load target function pointer from GOT;   
   > Save off current GOT pointer to stack;   
   > Load code pointer from function pointer;   
   > Load GOT pointer from function pointer;   
   > Call function;   
   > Reload previous GOT pointer.   
      
   My 66000 can indirect through GOT so the above sequence is::   
      
    CALX [ip,,GOT[n]-.]   
      
   and references to GOT are like above (functions) or (extern) as::   
      
    LDD Rp,[ip,,GOT[n]-.]   
      
   Each linked module gets its own GOT.   
      
   > It, errm, kinda sucks...   
      
   Bad ISA makes many things suck--whereas good ISA does not.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|