]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
With this commit, I hereby pronounce gensetdefs past its use-by date.
authorPeter Wemm <peter@FreeBSD.org>
Wed, 13 Jun 2001 10:58:39 +0000 (10:58 +0000)
committerPeter Wemm <peter@FreeBSD.org>
Wed, 13 Jun 2001 10:58:39 +0000 (10:58 +0000)
commitf41325db5f16640212574a03b9a34e5ed4a884ca
tree88aef8097c80f09c2f725d61b6da4d433a595a61
parentf3a6406c668744d1692c960352110b9b4c7ea9a6
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.  <sys/linker_set.h> 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_<setname> and
__stop_<setname>).  Thanks to Richard Henderson <rth@redhat.com> 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
43 files changed:
sys/alpha/linux/linux.h
sys/alpha/linux/linux_sysvec.c
sys/compat/linux/linux_ioctl.c
sys/conf/Makefile.alpha
sys/conf/Makefile.i386
sys/conf/Makefile.ia64
sys/conf/Makefile.pc98
sys/conf/Makefile.powerpc
sys/conf/kmod.mk
sys/ddb/db_command.c
sys/dev/fb/fb.c
sys/dev/fb/fbreg.h
sys/dev/kbd/kbd.c
sys/dev/kbd/kbdreg.h
sys/dev/syscons/scgfbrndr.c
sys/dev/syscons/scterm.c
sys/dev/syscons/scvgarndr.c
sys/dev/syscons/scvidctl.c
sys/dev/syscons/syscons.h
sys/fs/nwfs/nwfs_io.c
sys/fs/nwfs/nwfs_node.c
sys/fs/smbfs/smbfs_io.c
sys/fs/smbfs/smbfs_node.c
sys/i386/linux/linux.h
sys/i386/linux/linux_sysvec.c
sys/kern/init_main.c
sys/kern/kern_ktr.c
sys/kern/kern_linker.c
sys/kern/kern_sysctl.c
sys/kern/link_aout.c
sys/kern/link_elf.c
sys/kern/link_elf_obj.c
sys/kern/linker_if.m
sys/kern/tty_cons.c
sys/netncp/ncp_conn.c
sys/netsmb/smb_conn.c
sys/pc98/cbus/scgdcrndr.c
sys/pc98/pc98/scgdcrndr.c
sys/sys/cons.h
sys/sys/kernel.h
sys/sys/linker.h
sys/sys/linker_set.h
sys/sys/sysctl.h