mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 14:56:13 +01:00
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
6c62dafbff
commit
d2c48a2708
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61593
@ -32,7 +32,8 @@ S= ../..
|
||||
.endif
|
||||
M= ${MACHINE_ARCH}
|
||||
|
||||
SIZE?= size
|
||||
SIZE?= size
|
||||
OBJCOPY?= objcopy
|
||||
|
||||
COPTFLAGS?=-O
|
||||
INCLUDES= -nostdinc -I- -I. -I$S
|
||||
@ -89,7 +90,8 @@ SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
||||
-e locorestart \
|
||||
-export-dynamic -dynamic-linker /red/herring \
|
||||
-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
|
||||
|
||||
%BEFORE_DEPEND
|
||||
@ -119,7 +121,7 @@ FULLKERNEL= ${KERNEL}
|
||||
.else
|
||||
FULLKERNEL= ${KERNEL}.debug
|
||||
${KERNEL}: ${FULLKERNEL}
|
||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||
.endif
|
||||
|
||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||
|
@ -32,7 +32,8 @@ S= ../..
|
||||
.endif
|
||||
M= ${MACHINE_ARCH}
|
||||
|
||||
SIZE?= size
|
||||
SIZE?= size
|
||||
OBJCOPY?= objcopy
|
||||
|
||||
COPTFLAGS?=-O
|
||||
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 \
|
||||
-export-dynamic -dynamic-linker /red/herring \
|
||||
-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
|
||||
|
||||
%BEFORE_DEPEND
|
||||
@ -119,7 +121,7 @@ FULLKERNEL= ${KERNEL}
|
||||
.else
|
||||
FULLKERNEL= ${KERNEL}.debug
|
||||
${KERNEL}: ${FULLKERNEL}
|
||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||
.endif
|
||||
|
||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||
|
@ -34,7 +34,8 @@ S= ../..
|
||||
.endif
|
||||
M= ${MACHINE_ARCH}
|
||||
|
||||
SIZE?= size
|
||||
SIZE?= size
|
||||
OBJCOPY?= objcopy
|
||||
|
||||
COPTFLAGS?=-O
|
||||
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 \
|
||||
-export-dynamic -dynamic-linker /red/herring \
|
||||
-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
|
||||
|
||||
%BEFORE_DEPEND
|
||||
@ -121,7 +123,7 @@ FULLKERNEL= ${KERNEL}
|
||||
.else
|
||||
FULLKERNEL= ${KERNEL}.debug
|
||||
${KERNEL}: ${FULLKERNEL}
|
||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||
.endif
|
||||
|
||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||
|
@ -32,7 +32,8 @@ S= ../..
|
||||
.endif
|
||||
M= ${MACHINE_ARCH}
|
||||
|
||||
SIZE?= size
|
||||
SIZE?= size
|
||||
OBJCOPY?= objcopy
|
||||
|
||||
COPTFLAGS?=-O
|
||||
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 \
|
||||
-export-dynamic -dynamic-linker /red/herring \
|
||||
-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
|
||||
|
||||
%BEFORE_DEPEND
|
||||
@ -119,7 +121,7 @@ FULLKERNEL= ${KERNEL}
|
||||
.else
|
||||
FULLKERNEL= ${KERNEL}.debug
|
||||
${KERNEL}: ${FULLKERNEL}
|
||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||
.endif
|
||||
|
||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||
|
Loading…
Reference in New Issue
Block a user