From f10fa038c14063eaf2da32ed734e644e5f569694 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 13 Jun 2001 10:58:39 +0000 Subject: With this commit, I hereby pronounce gensetdefs past its use-by date. Replace the a.out emulation of 'struct linker_set' with something a little more flexible. now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_ and __stop_). Thanks to Richard Henderson for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind --- sys/fs/nwfs/nwfs_io.c | 2 -- sys/fs/nwfs/nwfs_node.c | 2 -- 2 files changed, 4 deletions(-) (limited to 'sys/fs/nwfs') diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index 8e73cf0..0529158 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -64,8 +64,6 @@ static int nwfs_fastlookup = 1; -extern struct linker_set sysctl_vfs_nwfs; - SYSCTL_DECL(_vfs_nwfs); SYSCTL_INT(_vfs_nwfs, OID_AUTO, fastlookup, CTLFLAG_RW, &nwfs_fastlookup, 0, ""); diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c index 0700b76..c708e1d 100644 --- a/sys/fs/nwfs/nwfs_node.c +++ b/sys/fs/nwfs/nwfs_node.c @@ -71,8 +71,6 @@ MALLOC_DEFINE(M_NWFSHASH, "NWFS hash", "NWFS has table"); static int nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS); -extern struct linker_set sysctl_vfs_nwfs; - SYSCTL_DECL(_vfs_nwfs); SYSCTL_PROC(_vfs_nwfs, OID_AUTO, vnprint, CTLFLAG_WR|CTLTYPE_OPAQUE, -- cgit v1.1