Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 1999 09:29:16 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Archie Cobbs <archie@whistle.com>
Cc:        current@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: Same module loaded twice?
Message-ID:  <Pine.BSF.4.01.9901260927200.88955-100000@herring.nlsystems.com>
In-Reply-To: <199901252246.OAA18293@bubba.whistle.com>

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



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