From owner-cvs-all Thu Apr 19 9: 7:57 2001 Delivered-To: cvs-all@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 4DCE437B42C; Thu, 19 Apr 2001 09:07:48 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from [62.49.251.130] (helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 14qGyB-000NRO-0Y; Thu, 19 Apr 2001 17:07:47 +0100 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.11.2/8.11.2) with ESMTP id f3JG6V791991; Thu, 19 Apr 2001 17:06:31 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Thu, 19 Apr 2001 17:06:31 +0100 (BST) From: Doug Rabson To: John Baldwin Cc: Doug Rabson , , Subject: RE: cvs commit: src/sys/ia64/ia64 vm_machdep.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 19 Apr 2001, John Baldwin wrote: > > On 19-Apr-01 Doug Rabson wrote: > > dfr 2001/04/19 05:35:48 PDT > > > > Modified files: > > sys/ia64/ia64 vm_machdep.c > > Log: > > Don't unwrap the function descriptor used as the callout argument to > > fork_exit(). The MI version of fork_exit() needs a real function > > descriptor, not a simple function pointer. > > Oh, whoops. Looks like I need to read up on ia64 calling conventions some more > before doing low-level ia64 hacking in the future. Does fork_trampoline() > actually work right? It does now. Basically 'function pointers' on ia64 are actually pointers to a little two-element structure with the real function pointer and a value for 'gp'. This allows shared libraries/kernel modules to have their own global object table. With a slight adjustment to imgact_elf.c to fall back to the right ABI, I can get to single user mode again. Index: imgact_elf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/imgact_elf.c,v retrieving revision 1.93 diff -u -r1.93 imgact_elf.c --- imgact_elf.c 2001/03/28 11:52:53 1.93 +++ imgact_elf.c 2001/04/19 15:17:27 @@ -442,7 +442,7 @@ /* * non static, as it can be overridden by start_init() */ -int fallback_elf_brand = -1; +int fallback_elf_brand = ELFOSABI_FREEBSD; SYSCTL_INT(_kern, OID_AUTO, fallback_elf_brand, CTLFLAG_RW, &fallback_elf_brand, -1, "ELF brand of last resort"); -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message