From owner-freebsd-current Wed Jan 13 17:15:03 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA03936 for freebsd-current-outgoing; Wed, 13 Jan 1999 17:15:03 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from assaris.sics.se (assaris.sics.se [193.10.66.108]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA03916 for ; Wed, 13 Jan 1999 17:15:01 -0800 (PST) (envelope-from assar@sics.se) Received: (from assar@localhost) by assaris.sics.se (8.9.1/8.7.3) id CAA00805; Thu, 14 Jan 1999 02:15:32 +0100 (CET) To: current@FreeBSD.ORG Subject: issues with building KLDs: dynamic numbers and compilation options Mime-Version: 1.0 (generated by tm-edit 7.68) Content-Type: text/plain; charset=US-ASCII From: Assar Westerlund Date: 14 Jan 1999 02:15:31 +0100 Message-ID: <5l3e5eodsc.fsf@assaris.sics.se> Lines: 32 X-Mailer: Gnus v5.5/Emacs 19.34 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi I've found some issues with the current way of building KLDs (and LKMs actually as well) while building the kernel module for Arla , that I'll try to summarize here and give me thoughts on the ways of solving them. 1. It's hard to figure what dynamic numbers (syscall numbers and cdev numbers) your module got assigned and to do something with them. I believe this could be solved with kern/9359 (already closed) and kern/9478 (not yet applied :-). 2. The module has to be compiled with same options as the kernel already has been compiled with and there's no way of finding out what those were. The problem is here mainly with DIAGNOSTIC (and INVARIANTS). If you don't build your module with or without -DDIAGNOSTIC in the same way as the kernel, your loose. The most noticable case is `zfree'. There are of course several options for fixing this: a. Install opt_global.h when installing the kernel b. Make the functions that depend on DIAGNOSTIC and INVARIANTS non-inline. c. Add non-inline versions of the above mentioned functions for modules. I would prefer b) or c) (that would allow using the same KLD module for differently compiled kernels) and would be willing to write the necessary patches. /assar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message