From owner-freebsd-bugs Wed Sep 30 07:37:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA11792 for freebsd-bugs-outgoing; Wed, 30 Sep 1998 07:37:32 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from george.lbl.gov (george.lbl.gov [131.243.2.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA11786 for ; Wed, 30 Sep 1998 07:37:30 -0700 (PDT) (envelope-from jin@george.lbl.gov) Received: (from jin@localhost) by george.lbl.gov (8.8.8/LBL-ITG) id HAA03587; Wed, 30 Sep 1998 07:37:12 -0700 (PDT) Date: Wed, 30 Sep 1998 07:37:12 -0700 (PDT) From: Jin Guojun (FTG staff) Message-Id: <199809301437.HAA03587@george.lbl.gov> To: bugs@FreeBSD.ORG, eivind@yes.no, jin@eubie.lbl.gov Subject: Re: what is changed in 3.0 for "ld" making lkm module Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org } > This is the command to make lkm module before 3.0-BETA } > } > ld -r -o /lkm/znatmdrv.o zatm_mod.o lib/znatm.Dro } > } > # file /lkm/znatmdrv.o } > /lkm/znatmdrv.o: FreeBSD/i386 object not stripped } > } > under 3.0-BETA } > } > # file /lkm/null_mod.o # looks the same } > /lkm/null_mod.o: FreeBSD/i386 object not stripped } > } > but } > } > # file /lkm/znatmdrv.o } > /lkm/znatmdrv.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), } not stripped } > # modload -ezatm_mod /lkm/znatmdrv.o } > /usr/libexec/aout/ld: /lkm/znatmdrv.o: malformed input file (not rel or archiv } e) modload: /usr/bin/ld: return code 1 } > } > Would someone please tell me what has been changed in "ld" command } > to make LKM module? } } It need an -aout switch at the very least. It looks the "cc" also needs a "-aout" switch for compiling, because "ld -r -aout" will complain the objects that compiled without "-aout" *.o: malformed input file (not rel or archive) Do you happen to know what is -aout directive doing? It was not used in FreeBSD before. } I think you'd find it convenient to use bsd.kmod.mk to create LKMs - } it abstract the actions for building the LKM, thus avoiding such } distruption. Look the the cvs log for it for exact details of what } has changed WRT building LKMs. Do you know if there is any example for using bsd.kmod.mk to build LKMs? Thanks, -Jin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message