Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Dec 2002 10:39:01 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Peter Wemm <peter@wemm.org>
Cc:        alex <lex@adelaide.on.net>, Yoriaki FUJIMORI <fujimori@ns.fujimori.cache.waseda.ac.jp>, alpha@FreeBSD.ORG, Andrew Gallatin <gallatin@cs.duke.edu>
Subject:   Re: link_elf: symbol osf1_wait4 undefined
Message-ID:  <XFMail.20021205103901.jhb@FreeBSD.org>
In-Reply-To: <20021204234741.D71802A7EA@canning.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 04-Dec-2002 Peter Wemm wrote:
> John Baldwin wrote:
>> 
>> On 04-Dec-2002 Andrew Gallatin wrote:
>> > 
>> > alex writes:
>> >  > ahhhh. That solved the problem. 
>> >  > What is the technical reason for having to load the osf1 module first ?
>> > 
>> > Linux/alpha uses the same ABI as OSF/1 for a number of functions,
>> > since they bootstrapped themselves from OSF/1 on alpha and never
>> > bothered to go fully native.  This ABI is already provided by our
>> > osf1.ko module.
>> > 
>> > The problem is that the osf1.ko module is SUPPOSED to be automatically
>> > loaded as a dependancy of the linux module.  I've asked the person who
>> > wrote the module dependancy code for help on this, but he's moved on
>> > to other things and has never answered.  If somebody wants to look
>> > into this, that would be great.  I've never been able to figure it
>> > out.
>> 
>> The problem is here:
>> 
>> > grep MODULE *
>> linux_sysvec.c:MODULE_VERSION(linux, 1);
>> linux_sysvec.c:MODULE_DEPEND(linux, osf1, 1, 1, 1);
>> linux_sysvec.c:MODULE_DEPEND(linux, sysvmsg, 1, 1, 1);
>> linux_sysvec.c:MODULE_DEPEND(linux, sysvsem, 1, 1, 1);
>> linux_sysvec.c:MODULE_DEPEND(linux, sysvshm, 1, 1, 1);
>> linux_sysvec.c:DECLARE_MODULE(linuxelf, linux_elf_mod, SI_SUB_EXEC, SI_ORDER_
>     ANY);
>> 
>> All the dependencies are recorded for the non-existent linux module.
>> In actuality, on Alpha there is a linuxelf module, and on i386 there
>> are linuxelf and linuxaout modules.  I'm trying to think about the
>> best way to go about fixing this.
> 
> No. The MODULE_VERSION/MODULE_DEPEND stuff is completely seperate to
> DECLARE_MODULE.  They are not in the same name space.  They are just tags.
> This is so that we can have tags in raw binary (no executable code) files.
> 
>> Well, I have an untested patch at
>> http://www.FreeBSD.org/~jhb/patches/linux.patch that might fix this.
>> FWIW, the dependency of linux compat on the SYSV modules was broken on
>> both i386 and alpha for the same reason.  Use 'patch -p6' to apply this
>> patch btw.
> 
> Nope, this assumes a connection between the namespaces.

Then why don't they work?  With the existing tags, if you
kldload linux and osf1 isn't loaded it fails instead of auto-loading
osf1.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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




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