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