From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 25 07:08:22 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C48AC16A421; Fri, 25 Jan 2008 07:08:22 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 5FA1313C465; Fri, 25 Jan 2008 07:08:22 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m0P78JS3009467 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Jan 2008 18:08:20 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m0P78Jal053142; Fri, 25 Jan 2008 18:08:19 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m0P78JQQ053141; Fri, 25 Jan 2008 18:08:19 +1100 (EST) (envelope-from peter) Date: Fri, 25 Jan 2008 18:08:19 +1100 From: Peter Jeremy To: Alfred Perlstein Message-ID: <20080125070819.GT63574@server.vk2pj.dyndns.org> References: <20080124221936.GS99258@elvis.mu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DKU6Jbt7q3WqK7+M" Content-Disposition: inline In-Reply-To: <20080124221936.GS99258@elvis.mu.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org Subject: Re: sysctl text definitions. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2008 07:08:22 -0000 --DKU6Jbt7q3WqK7+M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 24, 2008 at 02:19:36PM -0800, Alfred Perlstein wrote: >Hey guys, something that I've always wanted to do was actually somehow >export those handy description strings from the kernel SYSCTL macros >in the least obtrusive method possible. Likewise. >The only thing I could come up with that didn't require compiling the >files twice was to basically do some tricks where the text strings >wound up in some throw-away section of the object files. Many years ago I started to look at this: My idea was to stick the description strings into an ELF section that was not loaded. >Then these would be copied into /boot or maybe some other place >as part of the install process. If the relevant ELF sections are marked unloadable then there's no reason not to just leave them in the kernel/kld file. >Any ideas/pointers on how to do this linker magic? This is where I failed: My ld-foo wasn't sufficient to create the required linker scripts to make it all work. I don't remember if I kept the work I did. I thought I mentioned it on a mailing list but can't find it in my home archives or on google. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --DKU6Jbt7q3WqK7+M Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHmYrj/opHv/APuIcRAktBAKCtjawyiDuA4aOevXe/ksJ/pbZPSACfQboD cBhxdCDHu+Kd1QjKI2MfjZY= =7BBA -----END PGP SIGNATURE----- --DKU6Jbt7q3WqK7+M--