mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Nuke old gensetdefs based linker sets with extreme prejudice
This commit is contained in:
parent
d6be5f6435
commit
44fa54f5f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78195
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user