[10/10] build/criu/pie: Move trampolines to restorer-obj-y

Submitted by Dmitry Safonov on May 17, 2019, 10:53 p.m.

Details

Message ID 20190517225309.16082-11-dima@arista.com
State Accepted
Series "pie/build: Cleaning up PIE/compel"
Commit beeda670987b383aa4182b996e5c22aa43541765
Headers show

Commit Message

Dmitry Safonov May 17, 2019, 10:53 p.m.
We don't need patching vdso neither in parasite nor in criu.
Move it to restorer-only objects.

Note that we need filling symtables everywhere (kdat/parasite/restorer),
this change doesn't move util-vdso.o which has vdso_fill_symtable().

[those files ask for a proper rename, but it's not directly related to
the change, so yet TODO]

Signed-off-by: Dmitry Safonov <dima@arista.com>
---
 criu/pie/Makefile         | 12 ++++++++++++
 criu/pie/Makefile.library | 10 +---------
 2 files changed, 13 insertions(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index bb65f89089ce..bdff44816c79 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -25,6 +25,18 @@  ifeq ($(ARCH),x86)
         endif
 endif
 
+ifeq ($(VDSO),y)
+        restorer-obj-y		+= parasite-vdso.o ./$(ARCH_DIR)/vdso-pie.o
+
+        ifeq ($(SRCARCH),aarch64)
+                restorer-obj-y	+= ./$(ARCH_DIR)/intraprocedure.o
+        endif
+
+        ifeq ($(SRCARCH),ppc64)
+                restorer-obj-y	+= ./$(ARCH_DIR)/vdso-trampoline.o
+        endif
+endif
+
 define gen-pie-rules
 $(1)-obj-y	+= $(1).o
 $(1)-obj-e	+= pie.lib.a
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index 423c782aa64b..0a33a8861791 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -9,15 +9,7 @@  lib-name		:= pie.lib.a
 lib-y			+= util.o
 
 ifeq ($(VDSO),y)
-        lib-y		+= util-vdso.o parasite-vdso.o ./$(ARCH_DIR)/vdso-pie.o
-
-        ifeq ($(SRCARCH),aarch64)
-                lib-y	+= ./$(ARCH_DIR)/intraprocedure.o
-        endif
-
-        ifeq ($(SRCARCH),ppc64)
-                lib-y	+= ./$(ARCH_DIR)/vdso-trampoline.o
-        endif
+        lib-y		+= util-vdso.o
 endif
 
 ifeq ($(SRCARCH),ppc64)