[CRIU] [PATCH 10/11] make: pie - Require non PIE code for 32bit x86 code

Cyrill Gorcunov gorcunov at openvz.org
Wed Apr 22 10:20:05 PDT 2015


There is no rip addressing in 32bit code but PIE code
require GOT tables and friend which we should not have
for our parasite, so lets use pc relocations it should
do the trick.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 pie/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pie/Makefile b/pie/Makefile
index 98779a75f9d8..609d09161bab 100644
--- a/pie/Makefile
+++ b/pie/Makefile
@@ -28,7 +28,12 @@ restorer-libs-e		+= $(SYSCALL-LIB)
 #
 CFLAGS			:= $(filter-out -pg,$(CFLAGS))
 
+ifneq ($(filter-out i386 ia32, $(ARCH)),)
 cflags-y		+= -DCR_NOGLIBC -fpie  -Wa,--noexecstack -fno-stack-protector
+else
+cflags-y		+= -DCR_NOGLIBC -Wa,--noexecstack -fno-stack-protector
+endif
+
 ifeq ($(SRCARCH), arm)
 	cflags-y	+= -marm
 endif
-- 
2.1.0



More information about the CRIU mailing list