From owner-freebsd-current Tue Jul 29 21:14:13 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA06035 for current-outgoing; Tue, 29 Jul 1997 21:14:13 -0700 (PDT) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA06029 for ; Tue, 29 Jul 1997 21:14:06 -0700 (PDT) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.6/8.8.5) with ESMTP id VAA07616; Tue, 29 Jul 1997 21:12:58 -0700 (PDT) Message-Id: <199707300412.VAA07616@austin.polstra.com> To: Terry Lambert cc: msmith@atrad.adelaide.edu.au, current@FreeBSD.ORG Subject: Re: pccard and -current; a long way to go. :-( In-reply-to: Your message of "Tue, 29 Jul 1997 17:33:08 PDT." <199707300033.RAA03703@phaeton.artisoft.com> Date: Tue, 29 Jul 1997 21:12:58 -0700 From: John Polstra Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I think you need to document what needs to be done here. I would > be happy to run an ELF kernel in my now (mostly) non-ELF environment. Well, there are a zillion things that need to be done. Just off the top of my head: * Solve the booting problem. My hacked-up bootloader was within about 6 bytes of the maximum size -- way too big to commit. GRUB? An a.out wrapper for the ELF kernel? * Design a directory structure for the toolchain components so that it's reasonable to have both a.out and ELF tools installed at the same time. * Work out the various problems that stem from the fact that a.out prepends a leading underscore to global symbol names while ELF does not. (The usual reply to this is "let's just make our ELF tools prepend the underscore too," although I bet you know better than that. You're not allowed to do it because the ELF spec says you can't. If we want ELF, then let's have ELF and not elf.out or a.elf.) The underscore problem affects lots of areas: - assembly language code that references C globals - all programs that call nlist() - all programs that call dlopen() There are versions of nlist floating around that address this problem, and dlopen() could be made to do the right thing most of the time too. * Work out a build structure that will allow an a.out->ELF make world. * Consider the feasibility of mixed linking combining both ELF and a.out object modules and libraries. Likewise for dynamic linking. Some people have a.out libraries and executables which they paid money for. They don't want to throw them away. Again, the underscore problem is an obstacle here. > Did you use the "fast call" conventions on the ELF kernel system > calls? This would imply a libc rebuild, right? Are you talking about this in "src/lib/libc/i386/SYS.h"? #ifdef __ELF__ #define KERNCALL int $0x80 /* Faster */ #else #define KERNCALL LCALL(7,0) /* The old way */ #endif And by the way, can somebody explain why system calls care about the object file format of the application making the calls? It's not obvious to me. -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth