Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2002 18:15:21 +0200 (SAT)
From:      John Hay <jhay@icomtek.csir.co.za>
To:        current@FreeBSD.org
Subject:   multiple modules in a single .ko file
Message-ID:  <200208081615.g78GFMe60672@zibbi.icomtek.csir.co.za>

next in thread | raw e-mail | index | archive | help
I have been trying to put multiple modules in a single .ko file and with
the help of Garrett I can create a file which looks ok, but I have a
problem if a module inside the file depends on another module in the
same file, it looks like the linker can't sort it out. The problem
is with the miibus module and all the interface drivers that needs it.
I have tried to add a linker.hints file, with kldxref, but that doesn't
seem to help.

When sysinstall try to load it, I just see this message on the debug
screen:

########
DEBUG: Loading module drivers.ko (Various drivers)
link_elf: symbol mii_phy_probe undefined
########

If it matters, the way I created the single .ko was roughly this way:

################
Get a list of .kld's from the obj directory in dlist.
ld -r -d -o drivers.kld ${dlist}
ld -Bshareable -d -warn-common -o drivers.ko.debug drivers.kld
objcopy --strip-debug drivers.ko.debug drivers.ko
cp drivers.ko ${dstdir}/
################

John
-- 
John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org

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




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