From owner-freebsd-hackers Tue Jan 26 01:27:08 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA03280 for freebsd-hackers-outgoing; Tue, 26 Jan 1999 01:27:08 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA03270; Tue, 26 Jan 1999 01:27:05 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by nlsystems.com (8.9.1/8.8.5) with SMTP id JAA91150; Tue, 26 Jan 1999 09:29:16 GMT Date: Tue, 26 Jan 1999 09:29:16 +0000 (GMT) From: Doug Rabson To: Archie Cobbs cc: current@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Same module loaded twice? In-Reply-To: <199901252246.OAA18293@bubba.whistle.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 25 Jan 1999, Archie Cobbs wrote: > In the output below, notice there are two modules named "ng_sync_sr" > loaded in the "kernel" object (due to a typo), and moreover there's > a "netgraph" module loaded in both the "kernel" object and the "netgraph.ko" > object.. > > $ kldstat -v > Id Refs Address Size Name > 1 4 0xf0100000 1be82c kernel > Contains modules: > Id Name > 1 rootbus > 2 netgraph > 3 ng_sync_sr > 4 ng_sync_sr > 5 ufs > 6 nfs > 7 msdos > 8 procfs > 9 cd9660 > 10 ipfw > 11 if_tun > 12 if_sl > 13 if_ppp > 14 if_loop > 15 shell > 16 execgzip > 17 elf > 18 aout > 2 1 0xf07f1000 3000 ng_socket.ko > Contains modules: > Id Name > 20 ng_socket > 3 2 0xf07f5000 4000 netgraph.ko > Contains modules: > Id Name > 19 netgraph > > Why and how does the linker allow this? It seems like: > > - When the kernel was compiled, the ng_sync_sr conflict should > have caused a failure > - When the netgraph.ko was kldloaded, there should have been > an error from the conflicting module names The linker doesn't care (mostly) about modules at the moment, just the files which contain them. Mike has been thinking recently about a more flexible scheme with dependancies and versioning at the module level which is probably the right direction to take. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message