From 74d3bce70e28d82d1456e52b80389c8c2c4bcc97 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Tue, 17 Jan 2017 14:46:31 +0000 Subject: [PATCH] Use buildmode pie for Go code Signed-off-by: Justin Cormack --- alpine/base/binfmt/Makefile | 4 ++-- alpine/base/go-compile/compile.sh | 3 +-- alpine/containers/binfmt/Makefile | 4 ++-- alpine/packages/diagnostics/Makefile | 4 ++-- alpine/packages/proxy/Makefile | 4 ++-- alpine/packages/vsudd/Makefile | 4 ++-- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/alpine/base/binfmt/Makefile b/alpine/base/binfmt/Makefile index 82afb3614..5c0571b59 100644 --- a/alpine/base/binfmt/Makefile +++ b/alpine/base/binfmt/Makefile @@ -3,8 +3,8 @@ QEMU_IMAGE=mobylinux/qemu-user-static@sha256:6c022f700dc6c263c9107c08aa29b4eae3b QEMU_FILES=qemu-arm qemu-aarch64 qemu-ppc64le QEMU_BINARIES=$(addprefix usr/bin/,$(QEMU_FILES)) -# Tag: 6075d4b9c5fe30e19581f1b7ef1813f3041cca32 -GO_COMPILE=mobylinux/go-compile@sha256:badfd8a1730ab6e640682d0f95a8f9c51f3cd4b2e8db261fe1a1fd8c6f60bd6e +# Tag: bcc7cf6e6fc75e22dacc467043d462e5e9a3dc3f +GO_COMPILE=mobylinux/go-compile@sha256:f0f952162aff1d8962921da101ac18e21d7bb0cb53a3b36a4209a040da5f00e9 BINFMT_BINARY=usr/bin/binfmt # Tag: alpine:3.5 diff --git a/alpine/base/go-compile/compile.sh b/alpine/base/go-compile/compile.sh index bf81bd5aa..4bd3d5c35 100755 --- a/alpine/base/go-compile/compile.sh +++ b/alpine/base/go-compile/compile.sh @@ -46,7 +46,6 @@ tar xf - -C $dir >&2 echo "go build..." -go build -o $out --ldflags '-extldflags "-fno-PIC -static"' "$package" +go build -o $out -buildmode pie --ldflags '-extldflags "-fno-PIC -static"' "$package" tar cf - $out -exit 0 diff --git a/alpine/containers/binfmt/Makefile b/alpine/containers/binfmt/Makefile index d2c248197..45df3cb63 100644 --- a/alpine/containers/binfmt/Makefile +++ b/alpine/containers/binfmt/Makefile @@ -1,5 +1,5 @@ -# Tag: 76d5101db8a98f469e2023e44be78bd5df44a674 -BINFMT_IMAGE=mobylinux/binfmt@sha256:53f3d3366366daad17ab9ed2421a888b43c49048dd04c61dfa132d5f4d8fb1ab +# Tag: c3312201a71982a820067a521e457a8c29aa7397 +BINFMT_IMAGE=mobylinux/binfmt@sha256:2d08969710368376d927b0fc51796a2c30c67070421d4eb1973a08a83f98181f default: config.json diff --git a/alpine/packages/diagnostics/Makefile b/alpine/packages/diagnostics/Makefile index 5349f1903..ac2ee0a4a 100644 --- a/alpine/packages/diagnostics/Makefile +++ b/alpine/packages/diagnostics/Makefile @@ -1,5 +1,5 @@ -# Tag: 6075d4b9c5fe30e19581f1b7ef1813f3041cca32 -GO_COMPILE=mobylinux/go-compile@sha256:badfd8a1730ab6e640682d0f95a8f9c51f3cd4b2e8db261fe1a1fd8c6f60bd6e +# Tag: bcc7cf6e6fc75e22dacc467043d462e5e9a3dc3f +GO_COMPILE=mobylinux/go-compile@sha256:f0f952162aff1d8962921da101ac18e21d7bb0cb53a3b36a4209a040da5f00e9 default: usr/bin/diagnostics-server diff --git a/alpine/packages/proxy/Makefile b/alpine/packages/proxy/Makefile index 334e79dcf..ef302a32f 100644 --- a/alpine/packages/proxy/Makefile +++ b/alpine/packages/proxy/Makefile @@ -1,5 +1,5 @@ -# Tag: 6075d4b9c5fe30e19581f1b7ef1813f3041cca32 -GO_COMPILE=mobylinux/go-compile@sha256:badfd8a1730ab6e640682d0f95a8f9c51f3cd4b2e8db261fe1a1fd8c6f60bd6e +# Tag: bcc7cf6e6fc75e22dacc467043d462e5e9a3dc3f +GO_COMPILE=mobylinux/go-compile@sha256:f0f952162aff1d8962921da101ac18e21d7bb0cb53a3b36a4209a040da5f00e9 all: usr/bin/slirp-proxy sbin/proxy-vsockd diff --git a/alpine/packages/vsudd/Makefile b/alpine/packages/vsudd/Makefile index f23c20d27..755ed597f 100644 --- a/alpine/packages/vsudd/Makefile +++ b/alpine/packages/vsudd/Makefile @@ -1,5 +1,5 @@ -# Tag: 6075d4b9c5fe30e19581f1b7ef1813f3041cca32 -GO_COMPILE=mobylinux/go-compile@sha256:badfd8a1730ab6e640682d0f95a8f9c51f3cd4b2e8db261fe1a1fd8c6f60bd6e +# Tag: bcc7cf6e6fc75e22dacc467043d462e5e9a3dc3f +GO_COMPILE=mobylinux/go-compile@sha256:f0f952162aff1d8962921da101ac18e21d7bb0cb53a3b36a4209a040da5f00e9 default: sbin/vsudd