Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2010 16:39:17 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        Bruce Cran <bruce@cran.org.uk>, "Sergey V. Dyatko" <sergey.dyatko@gmail.com>, freebsd-hackers@freebsd.org, Ted Faber <faber@isi.edu>, Alexander Best <alexbestms@wwu.de>, freebsd-current@freebsd.org, Giorgos Keramidas <keramida@ceid.upatras.gr>
Subject:   Re: building world with debugging symbols [broken?]
Message-ID:  <AANLkTimD3Hcjqpy2w9Q0tvVDJ01gCH1ClSQCj2c4MFBz@mail.gmail.com>
In-Reply-To: <201006222208.23271.hselasky@c2i.net>
References:  <permail-20100305171533f7e55a9d0000225a-a_best01@message-id.uni-muenster.de> <201003301510.58203.jhb@freebsd.org> <87bpe4ps9m.fsf@kobe.laptop> <201006222208.23271.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimD3Hcjqpy2w9Q0tvVDJ01gCH1ClSQCj2c4MFBz>