Date: Sun, 28 Jan 2001 02:43:42 -0500 From: "Sue Wainer" <wainer@sandgate.com> To: "Freebsd-Arch" <freebsd-arch@FreeBSD.ORG> Subject: kldunload, and calling uninit function Message-ID: <NDBBLIBAPKIAHMINJJNFAEAGCEAA.wainer@sandgate.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
[-- Attachment #2 --]
try.c:
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
static void asic_init_try __P((void *));
static void asic_uninit_try __P((void *));
SYSINIT(asic_try, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, asic_init_try, NULL)
SYSUNINIT(asic_try, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, asic_uninit_try, NULL)
void asic_init_try(void *dummy)
{
printf("********GOT INTO INIT***********\n");
}
void asic_uninit_try(void *dummy)
{
printf("********GOT INTO UNINIT***********\n");
}
Makefile:
SRCS = try.c
LD += --print-map -Map try.map
KMOD = try
.include <bsd.kmod.mk>
setdefs.h:
DEFINE_SET(sysinit_set, 1);
DEFINE_SET(sysuninit_set, 1);
setdef0.c:
/* THIS FILE IS GENERATED, DO NOT EDIT. */
#define DEFINE_SET(set, count) \
__asm__(".section .set." #set ",\"aw\""); \
__asm__(".globl " #set); \
__asm__(".type " #set ",@object"); \
__asm__(".p2align 2"); \
__asm__(#set ":"); \
__asm__(".long " #count); \
__asm__(".previous")
#include "setdefs.h" /* Contains a `DEFINE_SET' for each set */
setdef1.c:
/* THIS FILE IS GENERATED, DO NOT EDIT. */
#define DEFINE_SET(set, count) \
__asm__(".section .set." #set ",\"aw\""); \
__asm__(".long 0"); \
__asm__(".previous")
#include "setdefs.h" /* Contains a `DEFINE_SET' for each set */
Diagnostic output when calling linker_elf_symbol_lookup():
Jan 28 02:16:27 BSD2 /kernel.diag: exhaustive search name=sysuninit_set
Jan 28 02:16:27 BSD2 /kernel.diag: now do search
Jan 28 02:16:27 BSD2 /kernel.diag: strp=
Jan 28 02:16:27 BSD2 last message repeated 21 times
Jan 28 02:16:27 BSD2 /kernel.diag: strp=setdef0.c
Jan 28 02:16:27 BSD2 /kernel.diag: strp=gcc2_compiled.
Jan 28 02:16:27 BSD2 /kernel.diag: strp=try.c
Jan 28 02:16:27 BSD2 /kernel.diag: strp=gcc2_compiled.
Jan 28 02:16:27 BSD2 /kernel.diag: strp=asic_try_sys_init
Jan 28 02:16:27 BSD2 /kernel.diag: strp=asic_init_try
Jan 28 02:16:27 BSD2 /kernel.diag: strp=__set_sysinit_set_sym_asic_try_sys_init
Jan 28 02:16:27 BSD2 /kernel.diag: strp=asic_try_sys_uninit
Jan 28 02:16:27 BSD2 /kernel.diag: strp=asic_uninit_try
Jan 28 02:16:27 BSD2 /kernel.diag: strp=__set_sysuninit_set_sym_asic_try_sys_uninit
Jan 28 02:16:27 BSD2 /kernel.diag: strp=setdef1.c
Jan 28 02:16:27 BSD2 /kernel.diag: strp=gcc2_compiled.
Jan 28 02:16:27 BSD2 /kernel.diag: strp=printf
Jan 28 02:16:27 BSD2 /kernel.diag: strp=sysinit_set
Jan 28 02:16:27 BSD2 /kernel.diag: strp=_DYNAMIC
Jan 28 02:16:27 BSD2 /kernel.diag: strp=_etext
Jan 28 02:16:27 BSD2 /kernel.diag: strp=maintry
Jan 28 02:16:27 BSD2 /kernel.diag: strp=__bss_start
Jan 28 02:16:27 BSD2 /kernel.diag: strp=_edata
Jan 28 02:16:27 BSD2 /kernel.diag: strp=_GLOBAL_OFFSET_TABLE_
Jan 28 02:16:27 BSD2 /kernel.diag: strp=_end
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NDBBLIBAPKIAHMINJJNFAEAGCEAA.wainer>
