From owner-freebsd-questions@FreeBSD.ORG Sun Jan 2 09:11:22 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7AE1065673 for ; Sun, 2 Jan 2011 09:11:22 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 8F42C8FC15 for ; Sun, 2 Jan 2011 09:11:22 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id p029BMEX002692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 2 Jan 2011 01:11:22 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id p029BL9M002691 for freebsd-questions@freebsd.org; Sun, 2 Jan 2011 01:11:21 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA00895; Sun, 2 Jan 11 01:07:53 PST Date: Sun, 02 Jan 2011 01:07:39 -0800 From: perryh@pluto.rain.com To: freebsd-questions@freebsd.org Message-Id: <4d20405b.peoSjXlhfff4u/n7%perryh@pluto.rain.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: kernel config =?> kernel code X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jan 2011 09:11:22 -0000 This feels like a really dumb (as in, the answer should be obvious) question, but so far it has eluded me: Given an option name in the kernel configuration file, how -- exactly -- does the directive to include or exclude that option get translated into particular code (source lines, .o files, symbols, etc.) that are thereby included in or excluded from the kernel? For example, the presence or absence of GEOM_PART_BSD or GEOM_PART_MBR presumably results in the inclusion or exclusion of _some_ code _somewhere_, but I've been unable to figure out how the correspondence is established. There's a mapping from option names to .h files in conf/options -- both GEOM_PART_BSD and GEOM_PART_MBR map to opt_geom.h -- and I suppose this is what causes config to create lines like #define GEOM_PART_MBR 1 and #define GEOM_PART_BSD 1 in /opt_geom.h, but I haven't found any #ifdef's or other uses of those symbols anywhere under /usr/src/sys or /usr/obj.