From b07bbf8152a4cebedab532cab4821819f4eb0f36 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Fri, 5 Jun 2015 00:04:06 +0300 Subject: [PATCH] pie: x86-32 -- Build parasite code without PIC There is no rip addressing in 32bit code but PIE code require GOT tables and friend which we better escape for performance sake. So lets use pc relocations it should do the trick. Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- pie/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pie/Makefile b/pie/Makefile index 17027b82f..6ecf25306 100644 --- a/pie/Makefile +++ b/pie/Makefile @@ -36,7 +36,12 @@ restorer-libs-e += $(SYSCALL-LIB) # CFLAGS := $(filter-out -pg,$(CFLAGS)) -cflags-y += -DCR_NOGLIBC -fpie -Wa,--noexecstack -fno-stack-protector +ifneq ($(filter-out i386 ia32, $(ARCH)),) +cflags-y += -DCR_NOGLIBC -fpie -Wa,--noexecstack -fno-stack-protector +else +cflags-y += -DCR_NOGLIBC -fno-pic -Wa,--noexecstack -fno-stack-protector +endif + ifeq ($(SRCARCH), arm) cflags-y += -marm endif