Re: ia64 unwind section: Loader implementation
[email protected] Fri, 30 Dec 2005 06:49:18 -0800
| Newsgroups | gmane.os.netbsd.ports.ia64,gmane.os.netbsd.devel.ports,gmane.os.netbsd.devel.toolchain,gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <[email protected]> |
overflowtext="",overflowoffset=0 date:component="Your message dated",formatfield="" body:component=">",overflowtext=">",overflowoffset=0 In message <20051230143801.GV20381-R3TnUASuKpIu9tbliTyh4XP7kWk+RT5R@public.gmane.org>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.