mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 14:48:57 +00:00
Use an intermediate file containing the module binary before converting
it into a ``shared'' .ko file. This intermediate file can be directly linked into a static kernel. This isn't all that useful yet but will become much more interesting shortly.
This commit is contained in:
parent
56dac036b6
commit
9e0f2a9fb1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58321
@ -131,14 +131,17 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
|
||||
PROG= ${KMOD}.ko
|
||||
.endif
|
||||
|
||||
${PROG}: ${OBJS} ${DPADD} ${KMODDEPS}
|
||||
${PROG}: ${KMOD}.kld ${KMODDEPS}
|
||||
${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld ${KMODDEPS}
|
||||
|
||||
${KMOD}.kld: ${OBJS}
|
||||
.if ${OBJFORMAT} == elf
|
||||
gensetdefs ${OBJS}
|
||||
${CC} ${CFLAGS} -c setdef0.c
|
||||
${CC} ${CFLAGS} -c setdef1.c
|
||||
${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} setdef0.o ${OBJS} setdef1.o ${KMODDEPS}
|
||||
${LD} ${LDFLAGS} -r -o ${.TARGET} setdef0.o ${OBJS} setdef1.o
|
||||
.else
|
||||
${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${OBJS} ${KMODDEPS}
|
||||
${LD} ${LDFLAGS} -r -o ${.TARGET} ${OBJS}
|
||||
.endif
|
||||
|
||||
.if defined(KMODDEPS)
|
||||
@ -193,7 +196,7 @@ ${_ILINKS}:
|
||||
${ECHO} ${.TARGET} "->" $$path ; \
|
||||
ln -s $$path ${.TARGET}
|
||||
|
||||
CLEANFILES+= ${PROG} ${OBJS} ${_ILINKS} symb.tmp tmp.o
|
||||
CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} ${_ILINKS} symb.tmp tmp.o
|
||||
|
||||
.if !target(install)
|
||||
.if !target(beforeinstall)
|
||||
|
@ -131,14 +131,17 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
|
||||
PROG= ${KMOD}.ko
|
||||
.endif
|
||||
|
||||
${PROG}: ${OBJS} ${DPADD} ${KMODDEPS}
|
||||
${PROG}: ${KMOD}.kld ${KMODDEPS}
|
||||
${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld ${KMODDEPS}
|
||||
|
||||
${KMOD}.kld: ${OBJS}
|
||||
.if ${OBJFORMAT} == elf
|
||||
gensetdefs ${OBJS}
|
||||
${CC} ${CFLAGS} -c setdef0.c
|
||||
${CC} ${CFLAGS} -c setdef1.c
|
||||
${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} setdef0.o ${OBJS} setdef1.o ${KMODDEPS}
|
||||
${LD} ${LDFLAGS} -r -o ${.TARGET} setdef0.o ${OBJS} setdef1.o
|
||||
.else
|
||||
${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${OBJS} ${KMODDEPS}
|
||||
${LD} ${LDFLAGS} -r -o ${.TARGET} ${OBJS}
|
||||
.endif
|
||||
|
||||
.if defined(KMODDEPS)
|
||||
@ -193,7 +196,7 @@ ${_ILINKS}:
|
||||
${ECHO} ${.TARGET} "->" $$path ; \
|
||||
ln -s $$path ${.TARGET}
|
||||
|
||||
CLEANFILES+= ${PROG} ${OBJS} ${_ILINKS} symb.tmp tmp.o
|
||||
CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} ${_ILINKS} symb.tmp tmp.o
|
||||
|
||||
.if !target(install)
|
||||
.if !target(beforeinstall)
|
||||
|
Loading…
Reference in New Issue
Block a user