Skip to content

Instantly share code, notes, and snippets.

@udzura
Last active July 24, 2018 11:27
Show Gist options
  • Save udzura/d42fed94119fb5dae06b6805ca848ad7 to your computer and use it in GitHub Desktop.
Save udzura/d42fed94119fb5dae06b6805ca848ad7 to your computer and use it in GitHub Desktop.
CRIUのプログラムを無理にShared Objectにする闇パッチ
diff --git a/criu/Makefile b/criu/Makefile
index b3b09ce7..2bd2ba27 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -82,6 +82,9 @@ $(obj)/criu: $(PROGRAM-BUILTINS)
$(call msg-link, $@)
$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(WRAPFLAGS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
+$(obj)/libcrtools.so: $(PROGRAM-BUILTINS)
+ $(call msg-link, $@)
+ $(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(WRAPFLAGS) $(LDFLAGS) $(GMONLDOPT) -shared -Wl,-soname=libcrtools.so.1 -rdynamic -o $@
#
# Clean the most, except generated c files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment