From 287a18452ad036fe687c88f26e9f59769dc283f5 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 8 Jan 2020 15:04:50 +0100 Subject: [PATCH] libasm.h: Don't include libebl.h. Define an opaque Ebl handle. Using libasm isn't really usable without a way to create an Ebl handle. But we don't support libebl.h (and libebl itself). Just define the Ebl handle as an opaque struct. Code that uses it needs to figure out how to instantiate one itself (they cannot in any supportable way...) Signed-off-by: Mark Wielaard --- libasm/ChangeLog | 5 +++++ libasm/libasm.h | 2 +- libasm/libasmP.h | 1 + tests/ChangeLog | 4 ++++ tests/asm-tst1.c | 1 + tests/asm-tst2.c | 1 + tests/asm-tst3.c | 1 + tests/asm-tst4.c | 1 + tests/asm-tst5.c | 1 + tests/asm-tst6.c | 1 + tests/asm-tst7.c | 1 + tests/asm-tst8.c | 1 + tests/asm-tst9.c | 1 + 13 files changed, 20 insertions(+), 1 deletion(-) diff --git a/libasm/ChangeLog b/libasm/ChangeLog index a1abac889..7b0d3df34 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,8 @@ +2020-01-08 Mark Wielaard + + * libasm.h: Don't include libebl.h. Define an opaque Ebl handle. + * libasmP.h: Do include libebl.h. + 2019-08-28 Mark Wielaard * Makefile.am (libasm_so_DEPS): Replace libebl.a with libebl_pic.a. diff --git a/libasm/libasm.h b/libasm/libasm.h index 5c6122436..a45c9fa35 100644 --- a/libasm/libasm.h +++ b/libasm/libasm.h @@ -32,7 +32,7 @@ #include #include -#include +typedef struct ebl Ebl; /* Opaque type for the assembler context descriptor. */ diff --git a/libasm/libasmP.h b/libasm/libasmP.h index 54460cf95..a4703fc32 100644 --- a/libasm/libasmP.h +++ b/libasm/libasmP.h @@ -31,6 +31,7 @@ #include +#include "libebl.h" #include #include "libdwelf.h" diff --git a/tests/ChangeLog b/tests/ChangeLog index f322b6a44..3e1c367d7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2020-01-08 Mark Wielaard + + * asm-test?.c: include libebl.h. + 2020-01-11 Frank Ch. Eigler * run-debuginfod-find.sh: Test --fdcache* options. diff --git a/tests/asm-tst1.c b/tests/asm-tst1.c index 9afc676b2..cdf2a921a 100644 --- a/tests/asm-tst1.c +++ b/tests/asm-tst1.c @@ -20,6 +20,7 @@ #endif #include +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include diff --git a/tests/asm-tst2.c b/tests/asm-tst2.c index 2556d0c41..9e88b70ce 100644 --- a/tests/asm-tst2.c +++ b/tests/asm-tst2.c @@ -20,6 +20,7 @@ #endif #include +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include diff --git a/tests/asm-tst3.c b/tests/asm-tst3.c index e52cfbe11..39c1d90c1 100644 --- a/tests/asm-tst3.c +++ b/tests/asm-tst3.c @@ -20,6 +20,7 @@ #endif #include +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include diff --git a/tests/asm-tst4.c b/tests/asm-tst4.c index 52e9e20bc..5114938b8 100644 --- a/tests/asm-tst4.c +++ b/tests/asm-tst4.c @@ -20,6 +20,7 @@ #endif #include +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include diff --git a/tests/asm-tst5.c b/tests/asm-tst5.c index 5a29b01c3..dcb852f81 100644 --- a/tests/asm-tst5.c +++ b/tests/asm-tst5.c @@ -20,6 +20,7 @@ #endif #include +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include diff --git a/tests/asm-tst6.c b/tests/asm-tst6.c index bd9b362b9..829cd90cd 100644 --- a/tests/asm-tst6.c +++ b/tests/asm-tst6.c @@ -19,6 +19,7 @@ # include #endif +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include diff --git a/tests/asm-tst7.c b/tests/asm-tst7.c index 00cb2bfe6..901797695 100644 --- a/tests/asm-tst7.c +++ b/tests/asm-tst7.c @@ -21,6 +21,7 @@ #include #include +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include diff --git a/tests/asm-tst8.c b/tests/asm-tst8.c index 4fb0d9987..a65509fef 100644 --- a/tests/asm-tst8.c +++ b/tests/asm-tst8.c @@ -21,6 +21,7 @@ #include #include +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include diff --git a/tests/asm-tst9.c b/tests/asm-tst9.c index b6d0e4314..681e872df 100644 --- a/tests/asm-tst9.c +++ b/tests/asm-tst9.c @@ -21,6 +21,7 @@ #include #include +#include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(asm) #include #include -- 2.47.2