From owner-freebsd-current@FreeBSD.ORG Tue Jun 22 20:39:19 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44E2F106566B; Tue, 22 Jun 2010 20:39:19 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9CFCF8FC12; Tue, 22 Jun 2010 20:39:18 +0000 (UTC) Received: by ewy22 with SMTP id 22so294225ewy.13 for ; Tue, 22 Jun 2010 13:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=PZuo2Balgps3qu0i+qebpWyf34VcoRd1aleAb++jQ7g=; b=leGdtdkraWW3RdVcm/rfi07RZzUyYpWCUITkC+9NNwhJp2HyHYHg1lIC0Yuo3hhkFc bp2C23ZPeF9eTu4TY3SgiOU0w8lTIJBJ13CBfa0UCA7cI2o4F7ShO+cNl8xVTkteJkoh ALgi8CIaaVZ1Z4rQEfKFV5NsZoLF9lHLerkgg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=CUICRvGxcMXsD5Cr7lAu0oChdogOx3AouWjeTIslJA3Vr8n0l7C9E51k6zMNLe5ftR oqXWKohYbYHeqd8pdDjEITIapLIo5eStLXsGaRK3rISqb9+w4Rerk82g7Sieahs+l4de WCoYORHdVY7txrcUMkotJob8OrXA00pZ2b8dA= MIME-Version: 1.0 Received: by 10.213.31.132 with SMTP id y4mr1891437ebc.51.1277239157248; Tue, 22 Jun 2010 13:39:17 -0700 (PDT) Received: by 10.213.10.131 with HTTP; Tue, 22 Jun 2010 13:39:17 -0700 (PDT) In-Reply-To: <201006222208.23271.hselasky@c2i.net> References: <201003301510.58203.jhb@freebsd.org> <87bpe4ps9m.fsf@kobe.laptop> <201006222208.23271.hselasky@c2i.net> Date: Tue, 22 Jun 2010 16:39:17 -0400 Message-ID: From: Ryan Stone To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: Bruce Cran , "Sergey V. Dyatko" , freebsd-hackers@freebsd.org, Ted Faber , Alexander Best , freebsd-current@freebsd.org, Giorgos Keramidas Subject: Re: building world with debugging symbols [broken?] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2010 20:39:19 -0000 I saw similar behaviour a couple of years ago when I switched from using gcc 4.0.2 to gcc 4.3.0 to compile some out-of-tree KLD modules. The problem ended up being a change in the linker script used by GNU ld for linking kernel modules. It used to always put some magic symbols used by the linker to implement things like sysinits into the module. It was changed to only provide those symbols, which apparently means that the linker would discard those symbols if nothing referenced them(and nothing did reference them). I had to work around it by adding the following to my link line: -u __start_set_sysinit_set -u __start_set_sysuninit_set \ -u __start_set_sysctl_set -u __start_set_modmetadata_set \ -u __stop_set_sysinit_set -u __stop_set_sysuninit_set \ -u __stop_set_sysctl_set -u __stop_set_modmetadata_set