Treat all of ^__ as compiler namespace and do not rename those
symbols. This fixes e.g. fortify and sh3 millicode issues. This is still not perfect, however, since e.g. the MIPS _gp_disp is not in ^__. XXX: we provide a few ^__ symbols in the kernel, but those can be easily renamed. The harder problem is how to keep the kernel clean of those afterwards.
This commit is contained in:
parent
fe82ae1baf
commit
893db2f6ab
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: Makefile.rump,v 1.27 2009/01/10 23:38:40 pooka Exp $
|
# $NetBSD: Makefile.rump,v 1.28 2009/01/11 12:55:37 pooka Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
WARNS?= 4
|
WARNS?= 4
|
||||||
@ -48,7 +48,7 @@ __archivebuild: .USE
|
|||||||
.if ${MACHINE_CPU} != "mips" && ${MACHINE_CPU} != "sh3" \
|
.if ${MACHINE_CPU} != "mips" && ${MACHINE_CPU} != "sh3" \
|
||||||
&& ${MACHINE_CPU} != "arm" && ${MACHINE_CPU} != "vax"
|
&& ${MACHINE_CPU} != "arm" && ${MACHINE_CPU} != "vax"
|
||||||
${NM} -go ${.TARGET} | ${TOOL_AWK} ' \
|
${NM} -go ${.TARGET} | ${TOOL_AWK} ' \
|
||||||
$$NF!~/^(rump|RUMP|__(start|stop)_link_set|_GLOBAL_OFFSET_TABLE)/ \
|
$$NF!~/^(rump|RUMP|__|_GLOBAL_OFFSET_TABLE)/ \
|
||||||
{printf "%s rumpns_%s\n", $$NF, $$NF}' \
|
{printf "%s rumpns_%s\n", $$NF, $$NF}' \
|
||||||
| sort | uniq > renametab.${.TARGET}
|
| sort | uniq > renametab.${.TARGET}
|
||||||
${OBJCOPY} --redefine-syms renametab.${.TARGET} ${.TARGET}
|
${OBJCOPY} --redefine-syms renametab.${.TARGET} ${.TARGET}
|
||||||
|
Loading…
Reference in New Issue
Block a user