[klibc] [klibc:master] Disable PIE

klibc-bot for Ben Hutchings ben at decadent.org.uk
Fri Jan 18 08:42:15 PST 2019


Commit-ID:  84d319b2fda958d73a58bf338ee212da772d0cc6
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=84d319b2fda958d73a58bf338ee212da772d0cc6
Author:     Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Sun, 6 Jan 2019 03:44:40 +0000
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 18 Jan 2019 03:10:14 +0000

[klibc] Disable PIE

We link all executables as non-relocatable, so it makes no sense to
generate PIE code.  In addition, PIE code on i386 requires a working
GOT which we don't generate.

Link: https://www.zytor.com/pipermail/klibc/2019-January/004028.html
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

---
 scripts/Kbuild.klibc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index f147a37..35c375e 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -67,7 +67,8 @@ include $(srctree)/scripts/Kbuild.include
 # ---------------------------------------------------------------------------
 
 KLIBCREQFLAGS     := $(call cc-option, -fno-stack-protector, ) \
-                     $(call cc-option, -fwrapv, )
+                     $(call cc-option, -fwrapv, ) \
+                     $(call cc-option, -fno-PIE, )
 KLIBCARCHREQFLAGS :=
 KLIBCOPTFLAGS     :=
 KLIBCWARNFLAGS    := -W -Wall -Wno-sign-compare -Wno-unused-parameter


More information about the klibc mailing list