[CRIU] [PATCH 3/3] compel: Provide piegen_opt_t in library

Dmitry Safonov dima at arista.com
Wed Nov 28 02:20:59 MSK 2018


Fixes:
verify-elf: ERROR: ./usr/lib64/libcompel.so.1.0: undefined symbol: opts

Reported-by: Alexey Shabalin <>
Signed-off-by: Dmitry Safonov <dima at arista.com>
---
 compel/src/lib/handle-elf.c | 2 ++
 compel/src/main.c           | 1 -
 test/compel/main.c          | 7 -------
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/compel/src/lib/handle-elf.c b/compel/src/lib/handle-elf.c
index f1cf74ff4f98..ca7c53b71101 100644
--- a/compel/src/lib/handle-elf.c
+++ b/compel/src/lib/handle-elf.c
@@ -18,6 +18,8 @@
 #include "piegen.h"
 #include "log.h"
 
+piegen_opt_t opts = {};
+
 /* Check if pointer is out-of-bound */
 static bool __ptr_oob(const uintptr_t ptr, const uintptr_t start, const size_t size)
 {
diff --git a/compel/src/main.c b/compel/src/main.c
index 86d22abd32e1..51bac099fe5e 100644
--- a/compel/src/main.c
+++ b/compel/src/main.c
@@ -60,7 +60,6 @@ static const flags_t flags = {
 #endif
 };
 
-piegen_opt_t opts = {};
 const char *uninst_root;
 
 static int piegen(void)
diff --git a/test/compel/main.c b/test/compel/main.c
index 846095ea1a8f..a6a014948a5f 100644
--- a/test/compel/main.c
+++ b/test/compel/main.c
@@ -23,13 +23,6 @@ const size_t test_elf_buf_size = 4096;
 extern int handle_binary(void *mem, size_t size);
 extern void run_tests(void *mem);
 
-/* To shut down error printing on tests for failures */
-piegen_opt_t opts = {
-	.fout		= NULL,
-	.ferr		= NULL,
-	.fdebug		= NULL,
-};
-
 int launch_test(void *mem, int expected_ret, const char *test_fmt, ...)
 {
 	static unsigned test_nr = 1;
-- 
2.19.1



More information about the CRIU mailing list