1f030d
commit 985550a5b24009e9cb9e511f6d320f3ac1b6bf99
1f030d
Author: Mark Wielaard <mark@klomp.org>
1f030d
Date:   Wed Jan 8 15:04:50 2020 +0100
1f030d
1f030d
    libasm.h: Don't include libebl.h. Define an opaque Ebl handle.
1f030d
    
1f030d
    Using libasm isn't really usable without a way to create an Ebl handle.
1f030d
    But we don't support libebl.h (and libebl itself). Just define the
1f030d
    Ebl handle as an opaque struct. Code that uses it needs to figure out
1f030d
    how to instantiate one itself (they cannot in any supportable way...)
1f030d
    
1f030d
    Signed-off-by: Mark Wielaard <mark@klomp.org>
1f030d
1f030d
diff --git a/libasm/libasm.h b/libasm/libasm.h
1f030d
index 5c61224..a45c9fa 100644
1f030d
--- a/libasm/libasm.h
1f030d
+++ b/libasm/libasm.h
1f030d
@@ -32,7 +32,7 @@
1f030d
 #include <stdbool.h>
1f030d
 #include <stdint.h>
1f030d
 
1f030d
-#include <libebl.h>
1f030d
+typedef struct ebl Ebl;
1f030d
 
1f030d
 
1f030d
 /* Opaque type for the assembler context descriptor.  */
1f030d
diff --git a/libasm/libasmP.h b/libasm/libasmP.h
1f030d
index 54460cf..a4703fc 100644
1f030d
--- a/libasm/libasmP.h
1f030d
+++ b/libasm/libasmP.h
1f030d
@@ -31,6 +31,7 @@
1f030d
 
1f030d
 #include <stdio.h>
1f030d
 
1f030d
+#include "libebl.h"
1f030d
 #include <libasm.h>
1f030d
 
1f030d
 #include "libdwelf.h"
1f030d
diff --git a/tests/asm-tst1.c b/tests/asm-tst1.c
1f030d
index 9afc676..cdf2a92 100644
1f030d
--- a/tests/asm-tst1.c
1f030d
+++ b/tests/asm-tst1.c
1f030d
@@ -20,6 +20,7 @@
1f030d
 #endif
1f030d
 
1f030d
 #include <fcntl.h>
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>
1f030d
diff --git a/tests/asm-tst2.c b/tests/asm-tst2.c
1f030d
index 2556d0c..9e88b70 100644
1f030d
--- a/tests/asm-tst2.c
1f030d
+++ b/tests/asm-tst2.c
1f030d
@@ -20,6 +20,7 @@
1f030d
 #endif
1f030d
 
1f030d
 #include <fcntl.h>
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>
1f030d
diff --git a/tests/asm-tst3.c b/tests/asm-tst3.c
1f030d
index e52cfbe..39c1d90 100644
1f030d
--- a/tests/asm-tst3.c
1f030d
+++ b/tests/asm-tst3.c
1f030d
@@ -20,6 +20,7 @@
1f030d
 #endif
1f030d
 
1f030d
 #include <fcntl.h>
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>
1f030d
diff --git a/tests/asm-tst4.c b/tests/asm-tst4.c
1f030d
index 52e9e20..5114938 100644
1f030d
--- a/tests/asm-tst4.c
1f030d
+++ b/tests/asm-tst4.c
1f030d
@@ -20,6 +20,7 @@
1f030d
 #endif
1f030d
 
1f030d
 #include <fcntl.h>
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>
1f030d
diff --git a/tests/asm-tst5.c b/tests/asm-tst5.c
1f030d
index 5a29b01..dcb852f 100644
1f030d
--- a/tests/asm-tst5.c
1f030d
+++ b/tests/asm-tst5.c
1f030d
@@ -20,6 +20,7 @@
1f030d
 #endif
1f030d
 
1f030d
 #include <fcntl.h>
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>
1f030d
diff --git a/tests/asm-tst6.c b/tests/asm-tst6.c
1f030d
index bd9b362..829cd90 100644
1f030d
--- a/tests/asm-tst6.c
1f030d
+++ b/tests/asm-tst6.c
1f030d
@@ -19,6 +19,7 @@
1f030d
 # include <config.h>
1f030d
 #endif
1f030d
 
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>
1f030d
diff --git a/tests/asm-tst7.c b/tests/asm-tst7.c
1f030d
index 00cb2bf..9017976 100644
1f030d
--- a/tests/asm-tst7.c
1f030d
+++ b/tests/asm-tst7.c
1f030d
@@ -21,6 +21,7 @@
1f030d
 
1f030d
 #include <fcntl.h>
1f030d
 #include <inttypes.h>
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>
1f030d
diff --git a/tests/asm-tst8.c b/tests/asm-tst8.c
1f030d
index 4fb0d99..a65509f 100644
1f030d
--- a/tests/asm-tst8.c
1f030d
+++ b/tests/asm-tst8.c
1f030d
@@ -21,6 +21,7 @@
1f030d
 
1f030d
 #include <fcntl.h>
1f030d
 #include <inttypes.h>
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>
1f030d
diff --git a/tests/asm-tst9.c b/tests/asm-tst9.c
1f030d
index b6d0e43..681e872 100644
1f030d
--- a/tests/asm-tst9.c
1f030d
+++ b/tests/asm-tst9.c
1f030d
@@ -21,6 +21,7 @@
1f030d
 
1f030d
 #include <fcntl.h>
1f030d
 #include <inttypes.h>
1f030d
+#include ELFUTILS_HEADER(ebl)
1f030d
 #include ELFUTILS_HEADER(asm)
1f030d
 #include <libelf.h>
1f030d
 #include <stdio.h>