From 0932b10f5dc8843553000e2951f2f640740a3e10 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 2 Dec 2010 04:35:04 +0000 Subject: 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 --- sys/arch/octeon/conf/Makefile.octeon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/arch/octeon') diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index f87008a7b46..5634a900536 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.1 2010/09/20 06:32:30 syuu Exp $ +# $OpenBSD: Makefile.octeon,v 1.2 2010/12/02 04:35:03 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -75,11 +75,11 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< # ${SYSTEM_LD_HEAD} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} -SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS} +SYSTEM_OBJ= locore.o param.o ioconf.o vers.o ${OBJS} SYSTEM_DEP= Makefile ${SYSTEM_OBJ} SYSTEM_LD_HEAD= @rm -f $@ -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 $@ DEBUG?= -- cgit v1.2.3