[CRIU] [PATCH] compel: no -r for ARM ldflags

Kir Kolyshkin kir at openvz.org
Thu Mar 16 16:05:36 PDT 2017


Commit d9486bd720 ("arm/pie/build: do not produce relocatable parasite
object") removed -r from LDFLAGS used to compile criu pie. This
functionality somehow never made it to criu-dev, and was also lost
in master then compel was ported to it.

Make it work with compel.

Cc: Dmitry Safonov <dsafonov at virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 compel/src/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compel/src/main.c b/compel/src/main.c
index ea3da89..a66d60c 100644
--- a/compel/src/main.c
+++ b/compel/src/main.c
@@ -26,7 +26,11 @@
 #define COMPEL_CFLAGS_PIE	CFLAGS_DEFAULT_SET "-fpie"
 #define COMPEL_CFLAGS_NOPIC	CFLAGS_DEFAULT_SET "-fno-pic"
 
+#ifdef NO_RELOCS
+#define COMPEL_LDFLAGS_COMMON	"-z noexecstack -T "
+#else
 #define COMPEL_LDFLAGS_COMMON	"-r -z noexecstack -T "
+#endif
 
 typedef struct {
 	const char	*arch;		// dir name under arch/
-- 
2.9.3



More information about the CRIU mailing list