diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/alpha/common/Makefile.common | 13 | ||||
-rw-r--r-- | sys/boot/arc/loader/Makefile | 13 | ||||
-rw-r--r-- | sys/boot/common/bootstrap.h | 47 | ||||
-rw-r--r-- | sys/boot/common/isapnp.h | 2 | ||||
-rw-r--r-- | sys/boot/efi/loader/Makefile | 13 | ||||
-rw-r--r-- | sys/boot/ia64/efi/Makefile | 13 | ||||
-rw-r--r-- | sys/boot/powerpc/loader/Makefile | 13 | ||||
-rw-r--r-- | sys/boot/powerpc/ofw/Makefile | 13 |
8 files changed, 14 insertions, 113 deletions
diff --git a/sys/boot/alpha/common/Makefile.common b/sys/boot/alpha/common/Makefile.common index 72f8be2..32a6e0d 100644 --- a/sys/boot/alpha/common/Makefile.common +++ b/sys/boot/alpha/common/Makefile.common @@ -49,9 +49,9 @@ vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${BASE}: ${BASE}.sym ${BASE}.help objcopy -O binary ${BASE}.sym ${BASE} -${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o setdef0.o setdef1.o +${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o ${LD} -o ${BASE}.sym -M -e start -N -Ttext ${LOAD_ADDRESS} \ - ${CRT} setdef0.o ${OBJS} setdef1.o vers.o \ + ${CRT} ${OBJS} vers.o \ -L${DESTDIR}${LIBDIR} ${LIBSTAND} ${LIBALPHA} ${LIBFICL} ${LIBSTAND} \ >${.OBJDIR}/${BASE}.list @@ -87,10 +87,6 @@ beforeinstall: start.o: ${.CURDIR}/../libalpha/start.S ${CC} -c ${CFLAGS} $< -setdef0.o: setdefs.h - -setdef1.o: setdefs.h - machine: ln -sf ${.CURDIR}/../../../alpha/include machine @@ -98,9 +94,4 @@ CLEANFILES+= machine .include <bsd.prog.mk> -.ORDER: setdefs.h setdef0.c setdef1.c -setdefs.h setdef0.c setdef1.c: ${OBJS} - @echo Generating linker sets - @gensetdefs ${OBJS} - beforedepend ${OBJS}: machine diff --git a/sys/boot/arc/loader/Makefile b/sys/boot/arc/loader/Makefile index 40aec37..351311b 100644 --- a/sys/boot/arc/loader/Makefile +++ b/sys/boot/arc/loader/Makefile @@ -42,9 +42,9 @@ vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${BASE}.exe: ${BASE}.sym ${BASE}.help elf2exe ${BASE}.sym ${BASE}.exe -${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBARC} ${CRT} vers.o setdef0.o setdef1.o +${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBARC} ${CRT} vers.o ${LD} -o ${BASE}.sym -M -N -Ttext ${LOAD_ADDRESS} \ - ${CRT} setdef0.o ${OBJS} setdef1.o vers.o -L${DESTDIR}${LIBDIR} \ + ${CRT} ${OBJS} vers.o -L${DESTDIR}${LIBDIR} \ ${LIBSTAND} ${LIBARC} ${LIBSTAND} >${.OBJDIR}/${BASE}.list ${BASE}.help: help.common help.alpha @@ -63,18 +63,9 @@ beforeinstall: start.o: ${.CURDIR}/../lib/arch/${MACHINE_ARCH}/start.S ${CC} -c ${CFLAGS} $< -setdef0.o: setdefs.h - -setdef1.o: setdefs.h - machine: ln -sf ${.CURDIR}/../../../alpha/include machine .include <bsd.prog.mk> -.ORDER: setdefs.h setdef0.c setdef1.c -setdefs.h setdef0.c setdef1.c: ${OBJS} - @echo Generating linker sets - @gensetdefs ${OBJS} - beforedepend ${OBJS}: machine diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h index 81f65c8..11085eb 100644 --- a/sys/boot/common/bootstrap.h +++ b/sys/boot/common/bootstrap.h @@ -28,6 +28,7 @@ #include <sys/types.h> #include <sys/queue.h> +#include <sys/linker_set.h> /* * Generic device specifier; architecture-dependant @@ -232,50 +233,6 @@ vm_offset_t aout_findsym(char *name, struct preloaded_file *fp); int elf_loadfile(char *filename, vm_offset_t dest, struct preloaded_file **result); -#ifndef NEW_LINKER_SET -#include <sys/linker_set.h> - -/* XXX just for conversion's sake, until we move to the new linker set code */ - -#define SET_FOREACH(pvar, set) \ - for ((char*) pvar = set.ls_items; \ - (char*) pvar < (char*) &set.ls_items[set.ls_length]; \ - pvar++) - -#else /* NEW_LINKER_SET */ - -/* - * Private macros, not to be used outside this header file. - */ -#define __MAKE_SET(set, sym) \ - static void *__CONCAT(__setentry,__LINE__) \ - __attribute__((__section__("set_" #set),__unused__)) = &sym -#define __SET_BEGIN(set) \ - ({ extern void *__CONCAT(__start_set_,set); \ - &__CONCAT(__start_set_,set); }) -#define __SET_END(set) \ - ({ extern void *__CONCAT(__stop_set_,set); \ - &__CONCAT(__stop_set_,set); }) - -/* - * Public macros. - */ - -/* Add an entry to a set. */ -#define DATA_SET(set, sym) __MAKE_SET(set, sym) - -/* - * Iterate over all the elements of a set. - * - * Sets always contain addresses of things, and "pvar" points to words - * containing those addresses. Thus is must be declared as "type **pvar", - * and the address of each set item is obtained inside the loop by "*pvar". - */ -#define SET_FOREACH(pvar, set) \ - for (pvar = (__typeof__(pvar))__SET_BEGIN(set); \ - pvar < (__typeof__(pvar))__SET_END(set); pvar++) -#endif - /* * Support for commands */ @@ -291,7 +248,7 @@ struct bootblk_command static struct bootblk_command _cmd_ ## tag = { key, desc, func }; \ DATA_SET(Xcommand_set, _cmd_ ## tag) -extern struct linker_set Xcommand_set; +SET_DECLARE(Xcommand_set, struct bootblk_command); /* * The intention of the architecture switch is to provide a convenient diff --git a/sys/boot/common/isapnp.h b/sys/boot/common/isapnp.h index 053ec0a..60363ad 100644 --- a/sys/boot/common/isapnp.h +++ b/sys/boot/common/isapnp.h @@ -296,8 +296,6 @@ extern pnp_id pnp_devices[MAX_PNP_CARDS]; extern struct pnp_cinfo pnp_ldn_overrides[MAX_PNP_LDN]; extern int pnp_overrides_valid; -extern struct linker_set pnpdevice_set; - /* * these two functions are for use in drivers */ diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile index 4fb3f0e..998bf21 100644 --- a/sys/boot/efi/loader/Makefile +++ b/sys/boot/efi/loader/Makefile @@ -63,9 +63,9 @@ ${BASE}.efi: ${BASE}.sym --target=efi-app-${MACHINE_ARCH} \ ${BASE}.sym ${BASE}.efi -${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBARC} ${CRT} vers.o setdef0.o setdef1.o +${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBARC} ${CRT} vers.o ${LD} ${LDFLAGS} -o ${BASE}.sym -M \ - ${CRT} setdef0.o ${OBJS} setdef1.o vers.o \ + ${CRT} {OBJS} vers.o \ ${LIBFICL} ${LIBSTAND} ${LIBEFI} ${LIBSTAND} \ > ${.OBJDIR}/${BASE}.list @@ -85,18 +85,9 @@ beforeinstall: start.o: ${.CURDIR}/../libefi/arch/${MACHINE_ARCH}/start.S ${CC} -c ${CFLAGS} $< -setdef0.o: setdefs.h - -setdef1.o: setdefs.h - machine: ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine .include <bsd.prog.mk> -.ORDER: setdefs.h setdef0.c setdef1.c -setdefs.h setdef0.c setdef1.c: ${OBJS} - @echo Generating linker sets - @perl ${.CURDIR}/../../../kern/gensetdefs.pl ${OBJS} - beforedepend ${OBJS}: machine diff --git a/sys/boot/ia64/efi/Makefile b/sys/boot/ia64/efi/Makefile index 4fb3f0e..998bf21 100644 --- a/sys/boot/ia64/efi/Makefile +++ b/sys/boot/ia64/efi/Makefile @@ -63,9 +63,9 @@ ${BASE}.efi: ${BASE}.sym --target=efi-app-${MACHINE_ARCH} \ ${BASE}.sym ${BASE}.efi -${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBARC} ${CRT} vers.o setdef0.o setdef1.o +${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBARC} ${CRT} vers.o ${LD} ${LDFLAGS} -o ${BASE}.sym -M \ - ${CRT} setdef0.o ${OBJS} setdef1.o vers.o \ + ${CRT} {OBJS} vers.o \ ${LIBFICL} ${LIBSTAND} ${LIBEFI} ${LIBSTAND} \ > ${.OBJDIR}/${BASE}.list @@ -85,18 +85,9 @@ beforeinstall: start.o: ${.CURDIR}/../libefi/arch/${MACHINE_ARCH}/start.S ${CC} -c ${CFLAGS} $< -setdef0.o: setdefs.h - -setdef1.o: setdefs.h - machine: ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine .include <bsd.prog.mk> -.ORDER: setdefs.h setdef0.c setdef1.c -setdefs.h setdef0.c setdef1.c: ${OBJS} - @echo Generating linker sets - @perl ${.CURDIR}/../../../kern/gensetdefs.pl ${OBJS} - beforedepend ${OBJS}: machine diff --git a/sys/boot/powerpc/loader/Makefile b/sys/boot/powerpc/loader/Makefile index 4fb4192..591aa09 100644 --- a/sys/boot/powerpc/loader/Makefile +++ b/sys/boot/powerpc/loader/Makefile @@ -100,14 +100,10 @@ beforeinstall: ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ ${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults -${PROG}: ${OBJS} ${LIBOFW} ${LIBSTAND} ${LIBFICL} start.o vers.o setdef0.o setdef1.o - ${LD} ${LDFLAGS} -o ${.TARGET} setdef0.o start.o ${OBJS} setdef1.o \ +${PROG}: ${OBJS} ${LIBOFW} ${LIBSTAND} ${LIBFICL} start.o vers.o + ${LD} ${LDFLAGS} -o ${.TARGET} start.o ${OBJS} \ vers.o ${LIBFICL} ${LIBOFW} ${LIBSTAND} -setdef0.o: setdefs.h - -setdef1.o: setdefs.h - machine: ln -sf ${.CURDIR}/../../../powerpc/include machine @@ -118,8 +114,3 @@ beforedepend ${OBJS}: machine CLEANFILES+= machine setdefs.h setdef0.c setdef1.c setdef0.o setdef1.o \ start.o - -.ORDER: setdefs.h setdef0.c setdef1.c -setdefs.h setdef0.c setdef1.c: ${OBJS} - @echo Generating linker sets - @gensetdefs ${OBJS} diff --git a/sys/boot/powerpc/ofw/Makefile b/sys/boot/powerpc/ofw/Makefile index 4fb4192..591aa09 100644 --- a/sys/boot/powerpc/ofw/Makefile +++ b/sys/boot/powerpc/ofw/Makefile @@ -100,14 +100,10 @@ beforeinstall: ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ ${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults -${PROG}: ${OBJS} ${LIBOFW} ${LIBSTAND} ${LIBFICL} start.o vers.o setdef0.o setdef1.o - ${LD} ${LDFLAGS} -o ${.TARGET} setdef0.o start.o ${OBJS} setdef1.o \ +${PROG}: ${OBJS} ${LIBOFW} ${LIBSTAND} ${LIBFICL} start.o vers.o + ${LD} ${LDFLAGS} -o ${.TARGET} start.o ${OBJS} \ vers.o ${LIBFICL} ${LIBOFW} ${LIBSTAND} -setdef0.o: setdefs.h - -setdef1.o: setdefs.h - machine: ln -sf ${.CURDIR}/../../../powerpc/include machine @@ -118,8 +114,3 @@ beforedepend ${OBJS}: machine CLEANFILES+= machine setdefs.h setdef0.c setdef1.c setdef0.o setdef1.o \ start.o - -.ORDER: setdefs.h setdef0.c setdef1.c -setdefs.h setdef0.c setdef1.c: ${OBJS} - @echo Generating linker sets - @gensetdefs ${OBJS} |