[CRIU] [PATCH 05/38] compel: criu -- Use std plugin directly
Cyrill Gorcunov
gorcunov at openvz.org
Tue Oct 11 09:03:55 PDT 2016
When compel build objects it provides ".compel.init" and
".compel.exit" setions for plugins init/exit routines
and when we link PIE code in criu we simply zap them
out but code still reference to them inside std
text (even if we don't call them) so dont drop them.
Eventually compel will be loading plugins by self but
for now it's good for testing purpose to refernce
the plugin inside criu code.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/pie/Makefile | 8 ++++----
criu/pie/pie-reloc.lds.S.in | 2 ++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index 1a28c86e5c8c..420bb42e21ae 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -13,7 +13,7 @@ restorer-obj-y += restorer.o
restorer-obj-y += ./$(ARCH_DIR)/restorer.o
ifeq ($(ARCH),x86)
- restorer-obj-e += ./compel/arch/$(ARCH)/plugins/std/syscalls-64.o
+ restorer-obj-e += ./compel/plugins/std.built-in.o
ifeq ($(CONFIG_COMPAT),y)
restorer-obj-y += ./$(ARCH_DIR)/call32.o
@@ -21,7 +21,7 @@ ifeq ($(ARCH),x86)
endif
native-obj-y += ./$(ARCH_DIR)/parasite-head-64.o
- native-obj-e += ./compel/arch/$(ARCH)/plugins/std/syscalls-64.o
+ native-obj-e += ./compel/plugins/std.built-in.o
compat-obj-y += ./$(ARCH_DIR)/parasite-head-32.o
compat-obj-e += ./compel/plugins/std-32.built-in.o
@@ -32,8 +32,8 @@ ifeq ($(ARCH),x86)
AFLAGS_parasite-head-32.d += -fno-pic -m32 -DCONFIG_X86_32
else
native-obj-y += ./$(ARCH_DIR)/parasite-head.o
- native-obj-e += ./compel/arch/$(ARCH)/plugins/std/syscalls/syscalls.o
- restorer-obj-e += ./compel/arch/$(ARCH)/plugins/std/syscalls/syscalls.o
+ native-obj-e += ./compel/plugins/std.built-in.o
+ restorer-obj-e += ./compel/plugins/std.built-in.o
endif
target += $(parasite_target) restorer
diff --git a/criu/pie/pie-reloc.lds.S.in b/criu/pie/pie-reloc.lds.S.in
index c22a99e8f910..2d0730cbd58d 100644
--- a/criu/pie/pie-reloc.lds.S.in
+++ b/criu/pie/pie-reloc.lds.S.in
@@ -3,6 +3,8 @@ SECTIONS
.text : {
*(.head.text)
*(.text*)
+ *(.compel.init)
+ *(.compel.exit)
}
.data : {
--
2.7.4
More information about the CRIU
mailing list