Use buildmode pie for Go code

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2017-01-17 14:46:31 +00:00
parent ce2d21d79e
commit 74d3bce70e
6 changed files with 11 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,5 @@
# Tag: 76d5101db8a98f469e2023e44be78bd5df44a674
BINFMT_IMAGE=mobylinux/binfmt@sha256:53f3d3366366daad17ab9ed2421a888b43c49048dd04c61dfa132d5f4d8fb1ab
# Tag: c3312201a71982a820067a521e457a8c29aa7397
BINFMT_IMAGE=mobylinux/binfmt@sha256:2d08969710368376d927b0fc51796a2c30c67070421d4eb1973a08a83f98181f
default: config.json

View File

@ -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

View File

@ -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

View File

@ -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