Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2001 17:06:31 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Doug Rabson <dfr@FreeBSD.org>, <cvs-all@FreeBSD.org>, <cvs-committers@FreeBSD.org>
Subject:   RE: cvs commit: src/sys/ia64/ia64 vm_machdep.c
Message-ID:  <Pine.BSF.4.33.0104191702380.91843-100000@herring.nlsystems.com>
In-Reply-To: <XFMail.010419085750.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0104191702380.91843-100000>