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:  d...@nlsystems.com
Nonlinear Systems Ltd.                  Phone: +44 181 442 9037



To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to