Pass -pie in ldflags by default on Linux (and Fuchsia)? |
||
Issue descriptionOn Windows, we build with /dynamicbase by default, which makes all executables ASLR'd. On Mac, all our executables are ASLR'd by default. All our android binaries are linked with -pie. On Linux, we compile everything with -fPIC, but we only pass -pie in ldflags for chrome and a few one-off binaries (see e.g. https://chromium-review.googlesource.com/c/chromium/src/+/1294289). Should we use -pie by default for executables on linux (and fuchsia, i guess?), to make our build configs across platforms more consistent?
,
Oct 30
We can try and see what breaks.
,
Oct 31
pie is always on on Fuchsia already, the toolchain stuffs this in afaik.
,
Oct 31
,
Nov 1
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/849beaf2d3c89fc319c85a6add7d8a64cae14aae commit 849beaf2d3c89fc319c85a6add7d8a64cae14aae Author: Tom Anderson <thomasanderson@chromium.org> Date: Thu Nov 01 00:27:37 2018 Build executables with -pie on Linux and Fuchsia BUG= 900182 R=thakis TBR=dschuff Change-Id: I73402d71c1deb98564ec19d07d0e19e340bb6473 Reviewed-on: https://chromium-review.googlesource.com/c/1308097 Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#604462} [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/build/config/BUILD.gn [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/build/config/android/BUILD.gn [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/build/config/compiler/BUILD.gn [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/build/config/compiler/compiler.gni [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/build/config/fuchsia/BUILD.gn [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/build/config/gcc/BUILD.gn [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/chrome/BUILD.gn [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/components/nacl/loader/BUILD.gn [modify] https://crrev.com/849beaf2d3c89fc319c85a6add7d8a64cae14aae/tools/v8_context_snapshot/BUILD.gn
,
Nov 1
|
||
►
Sign in to add a comment |
||
Comment 1 by thomasanderson@chromium.org
, Oct 30Status: Assigned (was: Untriaged)