From 287a18452ad036fe687c88f26e9f59769dc283f5 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 8 Jan 2020 15:04:50 +0100 Subject: 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 a1abac88..7b0d3df3 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 5c612243..a45c9fa3 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 54460cf9..a4703fc3 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 f322b6a4..3e1c367d 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 9afc676b..cdf2a921 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 2556d0c4..9e88b70c 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 e52cfbe1..39c1d90c 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 52e9e20b..5114938b 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 5a29b01c..dcb852f8 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 bd9b362b..829cd90c 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 00cb2bfe..90179769 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 4fb0d998..a65509fe 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 b6d0e431..681e872d 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 -- cgit v1.2.1