From owner-freebsd-questions Fri Feb 22 15:52:40 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mired.org (dsl-64-192-6-133.telocity.com [64.192.6.133]) by hub.freebsd.org (Postfix) with SMTP id 59F3637B400 for ; Fri, 22 Feb 2002 15:52:36 -0800 (PST) Received: (qmail 29511 invoked by uid 100); 22 Feb 2002 23:52:25 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15478.55736.554792.708534@guru.mired.org> Date: Fri, 22 Feb 2002 17:52:24 -0600 To: Cliff Sarginson Cc: questions@freebsd.org Subject: Re: Kernel loader In-Reply-To: <70438893@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: "Mike Meyer" X-Delivery-Agent: TMDA/0.46 (Python 2.2; freebsd-4.5-STABLE-i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Cliff Sarginson types: > > > Now I do not believe that if you load module A, then module B is > > > automagically loaded as well. Looking at the program kldload it > > > is just a few lines that just invokes a system call to load the > > > module requested. I think the system call code should be in my > > > source tree somewhere but I am damned if I can find it. > > Your belief is incorrect. Well, it's incorrect for elf modules. I > > don't know about other formats because I didn't check them. The source > > code you want is in sys/kern/kern_linker.c and link_elf.c. > > My follow up question is why dependent modules cannot be loaded > automagically, but with what you have told me I may be able to > look further into that myself. To be honest, I am not entirely sure > what the use is of planting this dependency information if it is > not used to do such a thing. It means you have to know something > which the O/S is already capable of working out for you. The only > other answer is that you have to tell the kernel in advance what > a module is going to use for some other reason, although why escapes > me at this early hour. I think we got one to many negatives in there. The kernel loader *does* automatically load any dependencies listed for a module when it loads that module. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message