summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2020-01-08 15:04:50 +0100
committerMark Wielaard <mark@klomp.org>2020-01-12 17:14:52 +0100
commit287a18452ad036fe687c88f26e9f59769dc283f5 (patch)
tree41bfe327399389cb1463eeb3742430bcfd4c0108
parent1d26e8e1076b98e8131b96b718d80e0dcbbc3d86 (diff)
downloadelfutils-287a18452ad036fe687c88f26e9f59769dc283f5.tar.gz
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 <mark@klomp.org>
-rw-r--r--libasm/ChangeLog5
-rw-r--r--libasm/libasm.h2
-rw-r--r--libasm/libasmP.h1
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/asm-tst1.c1
-rw-r--r--tests/asm-tst2.c1
-rw-r--r--tests/asm-tst3.c1
-rw-r--r--tests/asm-tst4.c1
-rw-r--r--tests/asm-tst5.c1
-rw-r--r--tests/asm-tst6.c1
-rw-r--r--tests/asm-tst7.c1
-rw-r--r--tests/asm-tst8.c1
-rw-r--r--tests/asm-tst9.c1
13 files changed, 20 insertions, 1 deletions
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 <mark@klomp.org>
+
+ * libasm.h: Don't include libebl.h. Define an opaque Ebl handle.
+ * libasmP.h: Do include libebl.h.
+
2019-08-28 Mark Wielaard <mark@klomp.org>
* 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 <stdbool.h>
#include <stdint.h>
-#include <libebl.h>
+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 <stdio.h>
+#include "libebl.h"
#include <libasm.h>
#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 <mark@klomp.org>
+
+ * asm-test?.c: include libebl.h.
+
2020-01-11 Frank Ch. Eigler <fche@redhat.com>
* 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 <fcntl.h>
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>
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 <fcntl.h>
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>
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 <fcntl.h>
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>
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 <fcntl.h>
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>
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 <fcntl.h>
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>
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 <config.h>
#endif
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>
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 <fcntl.h>
#include <inttypes.h>
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>
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 <fcntl.h>
#include <inttypes.h>
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>
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 <fcntl.h>
#include <inttypes.h>
+#include ELFUTILS_HEADER(ebl)
#include ELFUTILS_HEADER(asm)
#include <libelf.h>
#include <stdio.h>