diff options
author | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-09-01 15:10:07 +0000 |
---|---|---|
committer | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-09-01 15:10:07 +0000 |
commit | 16ab26e5cd4af8121f23c822ef7890e7dcef1fed (patch) | |
tree | b2d79d504e7fece99cc72423ca63fe2e30a1e700 /sys/arch/alpha | |
parent | 8efab079194d16204286e3e9810116d55bec86a8 (diff) |
Fix alpha bootblocks: Compile with -fno-pie, link with -nopie.
tested by naddy@; ok deraadt@
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r-- | sys/arch/alpha/stand/boot/Makefile | 9 | ||||
-rw-r--r-- | sys/arch/alpha/stand/bootxx/Makefile | 9 | ||||
-rw-r--r-- | sys/arch/alpha/stand/netboot/Makefile | 9 |
3 files changed, 12 insertions, 15 deletions
diff --git a/sys/arch/alpha/stand/boot/Makefile b/sys/arch/alpha/stand/boot/Makefile index 835f06f82bf..b70b3d2ea75 100644 --- a/sys/arch/alpha/stand/boot/Makefile +++ b/sys/arch/alpha/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.18 2012/08/21 14:46:17 pascal Exp $ +# $OpenBSD: Makefile,v 1.19 2012/09/01 15:10:06 pascal Exp $ # $NetBSD: Makefile,v 1.17 1997/04/17 07:27:46 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -10,7 +10,6 @@ PROG = boot SRCS = start.S boot.c disk.c conf.c prom.c prom_disp.S OSFpal.c SRCS+= devopen.c filesystem.c loadfile_subr.c prom_swpal.S NOMAN= -NOPIE= INSTALL_STRIP= BINMODE= 444 @@ -27,9 +26,9 @@ SRCS+= loadfile.c DEFNS= -DCOMPAT_UFS -AFLAGS += -DASSEMBLER ${DEFNS} +AFLAGS += -DASSEMBLER ${DEFNS} -fno-pie CPPFLAGS += -I${.CURDIR}/../../../../lib/libsa -I${.CURDIR}/../.. -I${S} ${DEFNS} -CFLAGS = -Os -Werror -mno-fp-regs +CFLAGS = -Os -Werror -mno-fp-regs -fno-pie ${PROG}.nosym: ${PROG}.sym cp ${PROG}.sym ${PROG}.nosym @@ -60,6 +59,6 @@ LIBSA= ${SALIB} ${PROG}.sym: ${OBJS} ${LIBSA} ${LIBZ} sh ${.CURDIR}/newvers.sh ${.CURDIR}/version ${COMPILE.c} vers.c - ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym \ + ${LD} -nopie -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym \ ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBSA} size ${PROG}.sym diff --git a/sys/arch/alpha/stand/bootxx/Makefile b/sys/arch/alpha/stand/bootxx/Makefile index a55d2715bbd..a149ffe4fd7 100644 --- a/sys/arch/alpha/stand/bootxx/Makefile +++ b/sys/arch/alpha/stand/bootxx/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2012/08/21 14:46:18 pascal Exp $ +# $OpenBSD: Makefile,v 1.13 2012/09/01 15:10:06 pascal Exp $ # $NetBSD: Makefile,v 1.12 1997/04/17 07:27:49 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -9,7 +9,6 @@ PROG = bootxx SRCS = start.S bootxx.c prom.c prom_disp.S puts.c NOMAN= -NOPIE= INSTALL_STRIP= BINMODE= 444 @@ -22,9 +21,9 @@ SRCS+= bzero.c memcpy.c DEFNS= -DPRIMARY_BOOTBLOCK -AFLAGS += -DASSEMBLER ${DEFNS} +AFLAGS += -DASSEMBLER ${DEFNS} -fno-pie CPPFLAGS += -I${.CURDIR}/../.. -I${S} ${DEFNS} -CFLAGS = -Werror -mno-fp-regs +CFLAGS = -Werror -mno-fp-regs -fno-pie ${PROG}.nosym: ${PROG}.sym cp ${PROG}.sym ${PROG}.nosym @@ -40,5 +39,5 @@ lint: .include <bsd.prog.mk> ${PROG}.sym: ${OBJS} - ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym ${OBJS} + ${LD} -nopie -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym ${OBJS} size ${PROG}.sym diff --git a/sys/arch/alpha/stand/netboot/Makefile b/sys/arch/alpha/stand/netboot/Makefile index 54b242814f6..5df6864b73a 100644 --- a/sys/arch/alpha/stand/netboot/Makefile +++ b/sys/arch/alpha/stand/netboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2012/08/21 14:46:18 pascal Exp $ +# $OpenBSD: Makefile,v 1.12 2012/09/01 15:10:06 pascal Exp $ # $NetBSD: Makefile,v 1.11 1997/04/17 07:27:50 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -13,7 +13,6 @@ SRCS+= dev_net.c conf.c devopen.c SRCS+= if_prom.c getsecs.c SRCS+= loadfile_subr.c NOMAN= -NOPIE= INSTALL_STRIP= BINMODE= 444 @@ -29,9 +28,9 @@ SRCS+= loadfile.c DEFNS= -DPRIMARY_BOOTBLOCK -DSUN_BOOTPARAMS -AFLAGS += -DASSEMBLER ${DEFNS} +AFLAGS += -DASSEMBLER ${DEFNS} -fno-pie CPPFLAGS += -I${.CURDIR}/../.. -I${S} ${DEFNS} -CFLAGS = -Werror -mno-fp-regs +CFLAGS = -Werror -mno-fp-regs -fno-pie ${PROG}.nosym: ${PROG}.sym cp ${PROG}.sym ${PROG}.nosym @@ -62,6 +61,6 @@ LIBSA= ${SALIB} ${PROG}.sym: ${OBJS} ${LIBSA} ${LIBZ} sh ${.CURDIR}/newvers.sh ${.CURDIR}/version ${COMPILE.c} vers.c - ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym \ + ${LD} -nopie -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym \ ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBSA} size ${PROG}.sym |