Date: Mon, 25 Jan 1999 03:50:58 -0500 From: Xun Wilson Huang <wilson@ensim.com> To: freebsd-hackers@FreeBSD.ORG Subject: need help with linker_set Message-ID: <36AC3072.E5EEF339@ensim.com>
next in thread | raw e-mail | index | archive | help
Hi, I have been reading codes from the FreeBSD kernel and discover this neat thing "linker_set". As I understand, linker_set allows different modules/subsystems/files to put data into a "set" by inserting an assembly directive .stabs in the c code. At the linking stage, the linker puts all these set elements into an array, and one can write code to enumerate this array of set elements. ( Am I getting this right?) SYSCTL, SYSINIT, DOMAINSET, etc. all use this trick. I tried similar things in user space on FreeBSD and it also works. I have been digging for something similar to this on other platform and sadly, I can't find anything. I am wondering if any BSD guru here can point me to something that leads to a more system independent version of this trick? thanks a million. Xun Wilson Huang To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36AC3072.E5EEF339>