Date: Tue, 30 Nov 1999 10:18:17 +1100 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: chris@calldei.com, Bill Fumerola <billf@chc-chimes.com>, "Jordan K. Hubbard" <jkh@zippy.cdrom.com>, Dan Moschuk <dan@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/i386/conf files.i386 src/sys/kern kern_fork.c src/sys/libkern arc4random.c src/sys/sys libkern.h Message-ID: <99Nov30.101104est.40338@border.alcanet.com.au> In-Reply-To: <23833.943913718@critter.freebsd.dk> References: <19991129160908.J2233@holly.calldei.com> <23833.943913718@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1999-Nov-30 09:15:18 +1100, Poul-Henning Kamp wrote: > SYSCTL_STRING(_kern, KERN_NISDOMAINNAME, domainname, CTLFLAG_RW, > &domainname, sizeof(domainname), "Name of the current YP/NIS domain"); > >The string in the last argument gets put in a "non-load" ELF section >in the kernel. This much is trivial. >It is not particular hard to do this. You need to figure out some >way to tell GCC to stick this string in the special section, >but otherwise it should be a pretty simple job (do I see any >hands ?) __attribute__((section(".sysctl_descriptions"))) >priority 2: > Make it possible to extract the strings sysctl -d I have been looking at this. What I want to do is expand struct sysctl_oid to include a `pointer' to the (non-resident) sysctl description (and a pointer to the loaded filename to support sysctl's in KLDs). A new "staff-function" (eg sysctl({0,6,...},...)) would return the description "pointer" and the filename. Given the filename and description "pointer", the userland can then find the actual description. I believe it should be possible to make the "pointer" be the offset within the file (which saves the userland having to convert it into one). I've come across two stumbling blocks so far: 1) Making the linker generate a non-loaded section that can be referenced from a loaded section without expanding the ELF header. 2) Convincing the linker to use an address which translates directly (or trivially) to the file offset. I'd also like to see the sysctl descriptions become more descriptive, but that can wait until we can display them. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Nov30.101104est.40338>