From d4f3c7cd5518f00df42cdae34e395494befdb685 Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Tue, 27 Nov 2018 23:20:59 +0000 Subject: [PATCH] compel: Provide piegen_opt_t in library Fixes: verify-elf: ERROR: ./usr/lib64/libcompel.so.1.0: undefined symbol: opts Acked-by: Cyrill Gorcunov Reported-by: Alexey Shabalin <> Signed-off-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- 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 f1cf74ff4..ca7c53b71 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 86d22abd3..51bac099f 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 846095ea1..a6a014948 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;