Skip to content

Commit 61c74e1

Browse files
committed
glibc: allow to build position-independent static executable
This enables ALSR on static executables, which makes them harder to exploit by providing a crt suitable for static PIEs. Does this break existing binaries? Likely not. Static-pie is only used if explicitly enabled.
1 parent 3ce66c0 commit 61c74e1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkgs/development/libraries/glibc/common.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ stdenv.mkDerivation ({
153153
"--enable-add-ons"
154154
"--sysconfdir=/etc"
155155
"--enable-stackguard-randomization"
156+
"--enable-static-pie"
157+
"--enable-bind-now"
156158
(lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include")
157159
(lib.enableFeature profilingLibraries "profile")
158160
] ++ lib.optionals withLinuxHeaders [

0 commit comments

Comments
 (0)