From owner-freebsd-current Thu Aug 8 9:15:41 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30AE237B400 for ; Thu, 8 Aug 2002 09:15:38 -0700 (PDT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7902D43E42 for ; Thu, 8 Aug 2002 09:15:30 -0700 (PDT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.11.6/8.11.6) id g78GFMe60672 for current@FreeBSD.org; Thu, 8 Aug 2002 18:15:22 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200208081615.g78GFMe60672@zibbi.icomtek.csir.co.za> Subject: multiple modules in a single .ko file To: current@FreeBSD.org Date: Thu, 8 Aug 2002 18:15:21 +0200 (SAT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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