summaryrefslogtreecommitdiff
path: root/sys/arch/armish
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-12-02 04:35:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-12-02 04:35:04 +0000
commit0932b10f5dc8843553000e2951f2f640740a3e10 (patch)
tree0ca7e33ebb1d1eb6e026fd77cd56b784d2f61441 /sys/arch/armish
parent80591623fee343785ca049e555271283cce441f6 (diff)
move vers.o to before the other objects, so that it is not linked last.
having it linked last is bad (on at least i386 and amd64) because the lapic is mapped over the start of the data segment -- savecore(8) then reads the version string for a fixed buffer space, and reads into the lapic area causing unintended side-effects (at least on Intel X5570 and X5680) found by pedro, discussed with kettenis and mpf and miod
Diffstat (limited to 'sys/arch/armish')
-rw-r--r--sys/arch/armish/conf/Makefile.armish8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/armish/conf/Makefile.armish b/sys/arch/armish/conf/Makefile.armish
index ccff747e188..1b4bb2e3c54 100644
--- a/sys/arch/armish/conf/Makefile.armish
+++ b/sys/arch/armish/conf/Makefile.armish
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.armish,v 1.35 2010/06/01 23:49:22 deraadt Exp $
+# $OpenBSD: Makefile.armish,v 1.36 2010/12/02 04:35:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -67,7 +67,7 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
+SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o vers.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD_HEAD+=; \
@@ -75,8 +75,8 @@ SYSTEM_LD_HEAD+=; \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
-e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' > ldscript
-SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
- ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
+SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}'; \
+ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ}
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
SYSTEM_LD_TAIL+=; \
dd if=/dev/zero of=bsd bs=1 count=1 seek=95 conv=notrunc 2>/dev/null; \