The __wrap_* symbols need to become local symbols. If you have module

x which is dependent y but they both have __wrap_foo, if the __wrap_foo
is not localized, you will get linker truncation messages.
This commit is contained in:
matt 2003-04-23 18:34:20 +00:00
parent 13bf20997a
commit 275eeea6c9
2 changed files with 12 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.kmod.mk,v 1.59 2003/03/27 17:05:14 christos Exp $
# $NetBSD: bsd.kmod.mk,v 1.60 2003/04/23 18:34:20 matt Exp $
.include <bsd.init.mk>
@ -54,6 +54,12 @@ ${PROG}: ${KMOD}_tmp.o ${KMOD}_tramp.o
`${OBJDUMP} --reloc ${KMOD}_tmp.o | \
awk -f $S/lkm/arch/${MACHINE_ARCH}/lkmwrap.awk` \
-o tmp.o ${KMOD}_tmp.o ${KMOD}_tramp.o
.if exists($S/lkm/arch/${MACHINE_ARCH}/lkmhide.awk)
${OBJCOPY} \
`${NM} tmp.o | awk -f $S/lkm/arch/${MACHINE_ARCH}/lkmhide.awk` \
tmp.o tmp1.o
mv tmp1.o tmp.o
.endif
mv tmp.o ${.TARGET}
.else
${PROG}: ${OBJS} ${DPADD}

View File

@ -0,0 +1,5 @@
# $NetBSD: lkmhide.awk,v 1.1 2003/04/23 18:34:21 matt Exp $
substr($NF, 1, 7) == "__wrap_" {
print " --localize-symbol "$NF;
}