[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Native object relocation in GCL



On Fri, Jun 17, 2005 at 12:08:14PM -0400, Camm Maguire wrote:
> Greetings!  GCL, maxima, acl2, and axiom use a bfd-based native object
> relocation facility to loading compiled lisp objects into the running
> lisp image.  This works on all 12 Debian platforms now save only ia64
> and hppa.
> 
> We've recently added support for mips, mipsel, and alpha, which like
> at least some of these two use global position registers and other
> atypical linking features.  We did this by crafting and adding a
> global symbol table (i.e. .got/GOT) section at the end of each
> compiled file, setting the GP register to the beginning of this table,
> and pointing the relocation records in all other sections to the new
> table.  THe special relocation functions in libbfd are redirected if
> necessary. 
> 
> It would simplify life greatly if I could extend this functionality to
> ia64 and hppa, as maintaining the alternate workarounds based on
> dlopen is cumbersome.  It would be helpful if someone could point me
> to some succinct documentation somewhere which describes the handful
> of relocation types output by gcc.  Better yet if someone knows of an
> existing implementation in some other program I could study and copy. 

binutils/bfd/elf32-hppa.c is the best documentation we have.

Can you explain the *in memory* linker fixups you do?
What relocs do you have to handle?

I can probably help you with the relocs.

c.



Reply to: