Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Dec 2002 01:16:17 -0800
From:      Peter Wemm <peter@wemm.org>
To:        obrien@freebsd.org
Cc:        ia64@freebsd.org
Subject:   Re: cvsup binary package for ia64 ? 
Message-ID:  <20021225091617.C7E832A8A5@canning.wemm.org>
In-Reply-To: <20021225040036.GD17618@dragon.nuxi.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
"David O'Brien" wrote:
> On Tue, Dec 24, 2002 at 12:19:03AM -0800, Peter Wemm wrote:
> > Paul Saab wrote:
> > > it doesn't work.
> > 
> > More specifically, the i386 modula-3 runtime wants to execute code on the
> > non-executable data segment and/or stack and do other nasty things.  It
> > blows up spectacularly.
> 
> I thought either you or DFR managed to run the i386 CVSup client on
> IA-64.  Was that with a hacked up system or something?

Personally, I have not quite managed it.  But I only tried with the version
that uses the newer m3 implementation vs the older m3 implementation from
DEC.

Part of the solution was to make the data segment executable for i386
binaries.  This can be done by flipping a bit in the elf header, but I
added an #ifdef'ed hack in the kernel..

See kern/imgact_elf.c, around line 720..
                        /*
                         * Some x86 binaries assume read == executable,
                         * notably the M3 runtime and therefore cvsup
                         */
                        if (prot & VM_PROT_READ)
                                prot |= VM_PROT_EXECUTE;

It seems that ia64 trips up x86 binaries when they actually get what they ask
for.  Interestingly, the x86-64 cpu also adds a NX (no-execute) bit, so the
same problem could exist there.

Anyway, this may not be all of the problems.  I dont know how faithful our
emulation of the i386 signal context stuff is..  These hacks got me further
along, but not far enough.

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021225091617.C7E832A8A5>