Close the "unused" warning for things in linker-sets.

This will also allow us to catch typos in the setname by running a
nm through a grep.
This commit is contained in:
phk 1995-11-20 12:08:08 +00:00
parent 5bd563609a
commit d8a08a76c9
2 changed files with 13 additions and 7 deletions

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_lkm.c,v 1.17 1995/11/06 00:35:50 bde Exp $
* $Id: kern_lkm.c,v 1.18 1995/11/09 09:43:32 bde Exp $
*/
/*
@ -923,11 +923,15 @@ _lkm_exec(lkmtp, cmd)
return(err);
}
static const struct execsw lkm_exec_dummy = { NULL, "lkm" };
TEXT_SET(execsw_set, lkm_exec_dummy);
TEXT_SET(execsw_set, lkm_exec_dummy);
TEXT_SET(execsw_set, lkm_exec_dummy);
TEXT_SET(execsw_set, lkm_exec_dummy);
/* XXX: This is bogus. we should find a better method RSN! */
static const struct execsw lkm_exec_dummy1 = { NULL, "lkm" };
static const struct execsw lkm_exec_dummy2 = { NULL, "lkm" };
static const struct execsw lkm_exec_dummy3 = { NULL, "lkm" };
static const struct execsw lkm_exec_dummy4 = { NULL, "lkm" };
TEXT_SET(execsw_set, lkm_exec_dummy1);
TEXT_SET(execsw_set, lkm_exec_dummy2);
TEXT_SET(execsw_set, lkm_exec_dummy3);
TEXT_SET(execsw_set, lkm_exec_dummy4);
/*
* This code handles the per-module type "wiring-in" of loadable modules

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)kernel.h 8.3 (Berkeley) 1/21/94
* $Id: kernel.h,v 1.14 1995/11/13 07:18:09 bde Exp $
* $Id: kernel.h,v 1.15 1995/11/14 07:35:56 bde Exp $
*/
#ifndef _SYS_KERNEL_H_
@ -80,6 +80,8 @@ extern long timedelta;
* can't name them symbolically (e.g., 23 is N_SETT | N_EXT).
*/
#define MAKE_SET(set, sym, type) \
static void *const __set_##set##_sym_##sym = \
(&__set_##set##_sym_##sym, &sym, 0); \
asm(".stabs \"_" #set "\", " #type ", 0, 0, _" #sym)
#define TEXT_SET(set, sym) MAKE_SET(set, sym, 23)
#define DATA_SET(set, sym) MAKE_SET(set, sym, 25)