Subject: Re: ia64 unwind section: Loader implementation
To: Allen Briggs <briggs@netbsd.org>
From: None <jonathan@dsg.stanford.edu>
List: tech-kern
Date: 12/30/2005 06:49:18
overflowtext="",overflowoffset=0
date:component="Your message dated",formatfield=""
body:component=">",overflowtext=">",overflowoffset=0
In message <20051230143801.GV20381@canolog.ninthwonder.com>Allen Briggs writes
>[ Do we need this wide of a cross-post? ]
>
>On Fri, Dec 30, 2005 at 01:05:36PM +0530, Cherry George Mathew wrote:
>> a) Add a #ifdef within lib/libsa/loadfile_elf32.c
>
>ia64 uses elf32 ?
Elf support derived from CGD's code merely do, for 64-bit platforms
#define ELFSIZE 64
then includes the elf32.c version, which has #ifndef ELFSIZE/
#define ELFSIZE 32/#endif.
>
>Aside from that, this seems like the best option to me, but can it
>be abstracted a little bit into an md callback? Either to allow
>machine-specific selection of extra sections to load (I think this
>is my preference without digging into the code) or to just call a
>machine-specific routine to load what it needs?
That sounds useful for a real in-kernel ELF loader, too, but (per
above) it'd have to go into lib/libsa/loadfile_elf32.c. Supporting
different callbacks for 32-bit vs 64-bit hosts of the same broad arch
may require some more minor work elsewhere in the chain; more 32-bit
vs 64-bit mangling of elf32.[ch] entrypoints, etc.