Use objcopy to strip the gcc2_compiled. symbol from kernels.
ld(1) doesn't seem to have the ability to delete an arbitary symbol.
This commit is contained in:
parent
4310f54cc9
commit
f8f83dbe72
@ -32,7 +32,8 @@ S= ../..
|
|||||||
.endif
|
.endif
|
||||||
M= ${MACHINE_ARCH}
|
M= ${MACHINE_ARCH}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
OBJCOPY?= objcopy
|
||||||
|
|
||||||
COPTFLAGS?=-O
|
COPTFLAGS?=-O
|
||||||
INCLUDES= -nostdinc -I- -I. -I$S
|
INCLUDES= -nostdinc -I- -I. -I$S
|
||||||
@ -89,7 +90,8 @@ SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
|||||||
-e locorestart \
|
-e locorestart \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
|
||||||
|
${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/conf/ldscript.$M
|
SYSTEM_DEP+= $S/conf/ldscript.$M
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
@ -119,7 +121,7 @@ FULLKERNEL= ${KERNEL}
|
|||||||
.else
|
.else
|
||||||
FULLKERNEL= ${KERNEL}.debug
|
FULLKERNEL= ${KERNEL}.debug
|
||||||
${KERNEL}: ${FULLKERNEL}
|
${KERNEL}: ${FULLKERNEL}
|
||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||||
|
@ -32,7 +32,8 @@ S= ../..
|
|||||||
.endif
|
.endif
|
||||||
M= ${MACHINE_ARCH}
|
M= ${MACHINE_ARCH}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
OBJCOPY?= objcopy
|
||||||
|
|
||||||
COPTFLAGS?=-O
|
COPTFLAGS?=-O
|
||||||
INCLUDES= -nostdinc -I- -I. -I$S
|
INCLUDES= -nostdinc -I- -I. -I$S
|
||||||
@ -88,7 +89,8 @@ SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
|||||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
|
||||||
|
${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/conf/ldscript.$M
|
SYSTEM_DEP+= $S/conf/ldscript.$M
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
@ -119,7 +121,7 @@ FULLKERNEL= ${KERNEL}
|
|||||||
.else
|
.else
|
||||||
FULLKERNEL= ${KERNEL}.debug
|
FULLKERNEL= ${KERNEL}.debug
|
||||||
${KERNEL}: ${FULLKERNEL}
|
${KERNEL}: ${FULLKERNEL}
|
||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||||
|
@ -34,7 +34,8 @@ S= ../..
|
|||||||
.endif
|
.endif
|
||||||
M= ${MACHINE_ARCH}
|
M= ${MACHINE_ARCH}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
OBJCOPY?= objcopy
|
||||||
|
|
||||||
COPTFLAGS?=-O
|
COPTFLAGS?=-O
|
||||||
INCLUDES= -nostdinc -I- -I. -I$S
|
INCLUDES= -nostdinc -I- -I. -I$S
|
||||||
@ -90,7 +91,8 @@ SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
|||||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
|
||||||
|
${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/conf/ldscript.$M
|
SYSTEM_DEP+= $S/conf/ldscript.$M
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
@ -121,7 +123,7 @@ FULLKERNEL= ${KERNEL}
|
|||||||
.else
|
.else
|
||||||
FULLKERNEL= ${KERNEL}.debug
|
FULLKERNEL= ${KERNEL}.debug
|
||||||
${KERNEL}: ${FULLKERNEL}
|
${KERNEL}: ${FULLKERNEL}
|
||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||||
|
@ -32,7 +32,8 @@ S= ../..
|
|||||||
.endif
|
.endif
|
||||||
M= ${MACHINE_ARCH}
|
M= ${MACHINE_ARCH}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
OBJCOPY?= objcopy
|
||||||
|
|
||||||
COPTFLAGS?=-O
|
COPTFLAGS?=-O
|
||||||
INCLUDES= -nostdinc -I- -I. -I$S
|
INCLUDES= -nostdinc -I- -I. -I$S
|
||||||
@ -88,7 +89,8 @@ SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
|||||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
|
||||||
|
${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/conf/ldscript.$M
|
SYSTEM_DEP+= $S/conf/ldscript.$M
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
@ -119,7 +121,7 @@ FULLKERNEL= ${KERNEL}
|
|||||||
.else
|
.else
|
||||||
FULLKERNEL= ${KERNEL}.debug
|
FULLKERNEL= ${KERNEL}.debug
|
||||||
${KERNEL}: ${FULLKERNEL}
|
${KERNEL}: ${FULLKERNEL}
|
||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||||
|
Loading…
x
Reference in New Issue
Block a user