Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 87120781934 for <~alpine/devel@lists.alpinelinux.org>; Mon, 2 Dec 2019 10:18:40 +0000 (UTC) Received: by mail-lf1-f54.google.com with SMTP id l14so27472177lfh.10 for <~alpine/devel@lists.alpinelinux.org>; Mon, 02 Dec 2019 02:18:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S1CuxbfvGBSZM+2OQxjNcau3NYvJjg9s3whlWLUARqI=; b=bnPTJM1kXgNrB2bqRMVvyKj0tsTEURA26pnHh0v9c/iW8J74p/a/w0P12F+7bAwT1F vy39adYElL+lSZ0YF1hEHh69bYfMZM4wDUj7xvescHdKQWPIivAKZ1w6gJLQ/KP3gPTZ jxuhDjDeE1v+p7Jwa1Qy/wyXGjzzgB/0/PerUML6+VXPg1QSWeaceCM6rrYWOQ60ey8y e1/9IL1zXGMu7XGl30w6Y96zxKUF5y6eOfx1v9SZGH3uPWVNeEDF25kva9ELiycIsAYH tauHSTQdEyERHTHwmuldxEcghOSCNNH0iT2/FsBy7UG5yTyxLceC5KjQbt2GL6pgCGj2 2x1Q== X-Gm-Message-State: APjAAAVkXaOu09K92xkEsj/l/9P6ru3kUECspEgT+Emzcf7FNbOwy4I6 qOGo8D3PZvgWNjIOoRB0L1JtYers X-Google-Smtp-Source: APXvYqzLZ7rgKLj70NEfcgsDDEXk5YnRRPxfPsywK4V0elgj2RMBt1NuyFJcc517VCafDKxhB3hY2Q== X-Received: by 2002:ac2:4244:: with SMTP id m4mr12930738lfl.85.1575281919357; Mon, 02 Dec 2019 02:18:39 -0800 (PST) Received: from vostro (87-100-234-203.bb.dnainternet.fi. [87.100.234.203]) by smtp.gmail.com with ESMTPSA id n11sm14844319ljg.15.2019.12.02.02.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 02:18:38 -0800 (PST) Date: Mon, 2 Dec 2019 12:18:34 +0200 From: Timo Teras To: Wolf Cc: ~alpine/devel@lists.alpinelinux.org Subject: Re: community/go and buildmode pie Message-ID: <20191202121828.5ba2a735@vostro> In-Reply-To: <20191129221308.hy6ybayxu2nsu5dy@wolfsden.cz> References: <20191129221308.hy6ybayxu2nsu5dy@wolfsden.cz> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 29 Nov 2019 23:13:08 +0100 Wolf wrote: > go package in community uses buildmode pie by default due to this > patch: > > https://gitlab.alpinelinux.org/alpine/aports/blob/master/community/go/default-buildmode-pie.patch > > When looking into why I traced it down to > > https://gitlab.alpinelinux.org/alpine/aports/commit/9515100a5f4a9ad7b6b1d44a5fb9a7b1a6083aa7 > > which sadly has no explanation *why* this was commited. Alpine standard is to ship PIE if possible because full ASLR does not work without it. This is especially important for C/C++ applications. For native Go it's probably not that important, but if using CGO or pulling in other native code, it makes sense. Thus the decision was to default to PIE also for Go. Timo