gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: ia64


From: Richard E. Harke
Subject: [Gcl-devel] Re: ia64
Date: Mon, 15 Nov 2010 00:11:57 -0800
User-agent: KMail/1.9.9

Well, steps one and two were easy enough.

I have been reading documentation and looking
through existing code but i think it is time to
ask some questions. First, maybe, some more
background. If this is to replace the use of
dlopen, what is the advantage?

As a replacement for dlopen, I assume that only
the relocs handled in dlopen need be dealt with.

What about lazy binding?

Richard Harke


On Tuesday 26 October 2010 03:05:08 pm you wrote:
> "Richard E. Harke" <address@hidden> writes:
> > On Friday 27 August 2010 02:38:23 pm you wrote:
> >> Greetings!  We had discussed some time ago native object relocation in
> >> gcl on ia64, in the context of axiom support.  I've recently
> >> implemented an overhaul of this feature, supporting custom (non-bfd)
> >> relocation for all elf targets but ia64 and hppa.  To support ia64, I
> >> need to write a small switch statement on the elf relocation type, and
> >> example of which I can provide you if interested.
> >>
> >> Would you be available for questions in this area?
> >>
> >> Take care,
> >
> > I'm willing to do what I can to help. I haven't been working on ia64
> > much recently so it may take some effort for me to get back up to speed.
> > I still have an ia64 machine I could use for testing though the
> > software hasn't been updated in a while.
>
> Thank you so much!  Your efforts will save a lot of time and are thus
> greatly appreciated!
>
> Here in a nutshell is how to get started:
>
> 1) cvs -z9 -q -d:pserver:address@hidden:/sources/gcl co  -d \
> gcl-2.6.8pre -r Version_2_6_8pre gcl
>
> 2) cd gcl-2.6.8pre
>
> 3) write small elf64_ia64_reloc.h (and possibly
> elf64_ia64_reloc_special.h) files following the many examples in the
> h/ subdir for the other architectures
>
> 4) append to ia64-linux.h:
> #define RELOC_H "elf64_ia64_reloc.h"
>
> and optionally
>
> #define SPECIAL_RELOC_H "elf64_ia64_reloc_special.h"
>
> 5) ./configure --enable-debug --disable-dlopen --enable-custreloc && make
>
> 6) cd unixport
>
> 7) cat >f.l
> (defun foo (x) x)
> 
>
> 8) ./saved_gcl (or ./saved_pre_gcl
>
> 9) (compile-file "f.l")
>
> 10) (load "f")
>
> 11) (foo 1)
>
> then chase down bugs.  Once I get this file working, then I do
>
> 12) (defun bar (x) (flet ((g (x) x)) (g x)))
>
> 13) (compile 'bar)
>
> 14) (bar 2)
>
> then
>
> 15) (compile-file "../cmpnew/gcl_cmpeval.lsp")
>
> 16) (load *)
>
> 17) (compile nil '(lambda nil nil))
>
> finally
>
> 18) cd ../pcl && make
>
> If this goes mostly through (there will be some small errors as ansi
> was not configured in above), you are most likely done!
>
>
> As you can tell, most machines just need the simple reloc file with
> switch entries for the various reloc types.  o/sfaslelf.c includes
> these entries for the low level work.  's' holds the symbol value, 'a'
> the addend, 'r' the reloc entry, and 'where' the instruction address.
>
> Some machines requiring an appended .got table take an additional
> special reloc file.  The goal here is to allocate a got table entry to
> each needed reloc and encode it in the relocation or symbol
> structures.  On mips and alpha alone, tiny trampolines have t be
> written in this space as genuine .plt entries are not (yet) provided.
> I don't anticipate this problem on ia64.  All relocated addresses
> should lie within the base gcl executable, and not in an external
> shared library.  This is because the image can be moved, and said
> address might be different on a different machine.  Make sure to
> relocate 'sin' to the .plt entry of 'sin', etc.
>
> This sounds more daunting than it is.  Please let me know if anything
> is unclear -- I'd be most happy to help.  And thank you again so much
> for offering assistance!
>
> Take care,
>
> > Richard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]