[v2,02/16] move platform depended include into system.h of libebl
Commit Message
Because all source in libebl #include <libeblP.h>, so #include <system.h> in
libeblP.h is enough, there is multiple memory-access.h file, so use relative path to
include it properly,
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com
---
libebl/eblauxvinfo.c | 2 --
libebl/eblcorenote.c | 2 --
libebl/ebldynamictagname.c | 1 -
libebl/eblobjnote.c | 8 ++++----
libebl/eblobjnotetypename.c | 2 --
libebl/eblopenbackend.c | 1 -
libebl/libeblP.h | 1 +
7 files changed, 5 insertions(+), 12 deletions(-)
Comments
Hi,
On Sun, 2022-12-18 at 00:51 +0800, Yonggang Luo via Elfutils-devel
wrote:
> Because all source in libebl #include <libeblP.h>, so #include <system.h> in
> libeblP.h is enough, there is multiple memory-access.h file, so use relative path to
> include it properly,
See the discussion around v1 of this patch:
https://inbox.sourceware.org/elfutils-devel/19dc6579ce183b63a8956b17611e4a264d745b34.camel@klomp.org/
I have since pushed:
commit 6ecd16410ce1fe5cb0ac5b7c3342c5cc330e3a04
Author: Mark Wielaard <mark@klomp.org>
Date: Tue Dec 20 14:53:43 2022 +0100
Do not use relative include paths in library files.
Rely on include dirs being set up correctly. Setup libdw AM_CPPFLAGS
to include libebl directory. In libdwfl note that debuginfod.h is a
generated file in the builddir. Only include it in the one file
debuginfod-client.c that really needs it.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Please adjust your patch accordingly.
Thanks,
Mark
@@ -31,8 +31,6 @@
#endif
#include <assert.h>
-#include <byteswap.h>
-#include <endian.h>
#include <inttypes.h>
#include <stdio.h>
#include <stddef.h>
@@ -31,8 +31,6 @@
#endif
#include <assert.h>
-#include <byteswap.h>
-#include <endian.h>
#include <inttypes.h>
#include <stdio.h>
#include <stddef.h>
@@ -34,7 +34,6 @@
#include <inttypes.h>
#include <stdio.h>
#include <libeblP.h>
-#include "system.h"
const char *
@@ -37,10 +37,10 @@
#include <string.h>
#include <libeblP.h>
-#include "common.h"
-#include "libelfP.h"
-#include "libdwP.h"
-#include "memory-access.h"
+#include "../libelf/common.h"
+#include "../libelf/libelfP.h"
+#include "../libdw/libdwP.h"
+#include "../libdw/memory-access.h"
void
@@ -31,8 +31,6 @@
# include <config.h>
#endif
-#include <system.h>
-
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
@@ -37,7 +37,6 @@
#include <string.h>
#include <stdio.h>
-#include <system.h>
#include <libeblP.h>
Ebl *i386_init (Elf *, GElf_Half, Ebl *);
@@ -33,6 +33,7 @@
#include <libasm.h>
#include <libebl.h>
+#include <system.h>
/* Backend handle. */
struct ebl