[CRIU] [PATCH 5/8] pie: x86-32 -- Build parasite code without PIC
Cyrill Gorcunov
gorcunov at openvz.org
Mon May 11 09:06:21 PDT 2015
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 <gorcunov at openvz.org>
---
pie/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pie/Makefile b/pie/Makefile
index 2672769d92b6..49b48e6f3892 100644
--- a/pie/Makefile
+++ b/pie/Makefile
@@ -34,7 +34,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
--
2.1.0
More information about the CRIU
mailing list