Re: Native object relocation in GCL
>>>>> On Fri, 17 Jun 2005 12:08:14 -0400, Camm Maguire <camm@enhanced.com> said:
Camm> Greetings! GCL, maxima, acl2, and axiom use a bfd-based native object
Camm> relocation facility to loading compiled lisp objects into the running
Camm> lisp image. This works on all 12 Debian platforms now save only ia64
Camm> and hppa.
libbfd? You like to make your life difficult, eh? ;-)
Camm> It would simplify life greatly if I could extend this functionality to
Camm> ia64 and hppa, as maintaining the alternate workarounds based on
Camm> dlopen is cumbersome. It would be helpful if someone could point me
Camm> to some succinct documentation somewhere which describes the handful
Camm> of relocation types output by gcc. Better yet if someone knows of an
Camm> existing implementation in some other program I could study and copy.
Sure, the ia64 relocations are documented in the "Intel Itanium
Processor-specific ABI". You'll see that there are many relocations,
but if you look closely, you'll see that it's really just the entries
in a two-dimensional matrix, indexed by "how to relocate" ("formula")
and "what to relocate" ("data format"). So in effect, you only have
to have code for (num_rows + num_cols) cases, not the (num_rows *
num_cols) relocations described in the manual.
The module-loader in Linux kernel v2.6 might serve as a nice example
of how to handle them (see linux-2.6/arch/ia64/kernel/module.c). Of
course, as the author I'm a bit biased. ;-)
--david
[1] http://www.intel.com/design/itanium/downloads/245370.htm
Reply to: