]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Do not use relative include paths in library files.
authorMark Wielaard <mark@klomp.org>
Tue, 20 Dec 2022 13:53:43 +0000 (14:53 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 20 Dec 2022 17:41:05 +0000 (18:41 +0100)
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>
35 files changed:
libasm/ChangeLog
libasm/disasm_begin.c
libasm/disasm_cb.c
libcpu/ChangeLog
libcpu/bpf_disasm.c
libcpu/i386_disasm.c
libcpu/riscv_disasm.c
libdw/ChangeLog
libdw/Makefile.am
libdw/cfi.c
libdw/encoded-value.h
libdw/frame-cache.c
libdwelf/ChangeLog
libdwelf/libdwelfP.h
libdwfl/ChangeLog
libdwfl/Makefile.am
libdwfl/core-file.c
libdwfl/cu.c
libdwfl/debuginfod-client.c
libdwfl/dwfl_dwarf_line.c
libdwfl/dwfl_lineinfo.c
libdwfl/dwfl_module.c
libdwfl/dwfl_module_dwarf_cfi.c
libdwfl/dwfl_module_eh_cfi.c
libdwfl/dwfl_module_getdwarf.c
libdwfl/dwfl_module_getsrc.c
libdwfl/dwfl_module_getsrc_file.c
libdwfl/dwfl_segment_report_module.c
libdwfl/elf-from-memory.c
libdwfl/frame_unwind.c
libdwfl/libdwflP.h
libdwfl/lines.c
libdwfl/link_map.c
libdwfl/linux-core-attach.c
libdwfl/open.c

index ce0f24f46af78f6ca4cd382ff741075c8c7ed68e..a12d14b390848ec3540552c378ebe39eba0eac36 100644 (file)
@@ -1,3 +1,9 @@
+2022-12-20  Mark Wielaard  <mark@klomp.org>
+
+       * disasm_begin.c: Include libeblP.h.
+       * disasm_cb.c: Likewise.
+       * bpf_disasm.c: Likewise and include common.h.
+
 2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
 
        * asm_abort.c: Don't include unistd.h.
index cb10f66e85a82166d6b4987f8617a2a1b23d15d1..78db90c799a9f3c7e2727b58d6593c2cb650ff26 100644 (file)
@@ -34,7 +34,7 @@
 #include <stdlib.h>
 
 #include "libasmP.h"
-#include "../libebl/libeblP.h"
+#include "libeblP.h"
 
 
 DisasmCtx_t *
index 80f8b25bf302adc2d9566ece168abbe8d6115ce3..9353e2e518b6e55ae09ad0e105c2a26b3e68602f 100644 (file)
@@ -33,7 +33,7 @@
 #include <string.h>
 
 #include "libasmP.h"
-#include "../libebl/libeblP.h"
+#include "libeblP.h"
 
 
 struct symtoken
index 248b1aba66bf6dda15e3608df5481760b8515987..bd517b94568473f2c79aea1b35090f73d68952eb 100644 (file)
@@ -1,3 +1,9 @@
+2022-12-20  Mark Wielaard  <mark@klomp.org>
+
+       * bpf_disasm.c: Include common.h and libeblP.h.
+       * i386_disasm.c: Include libeblP.h.
+       * riscv_disasm.c: Likewise.
+
 2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
 
        * i386_data.h: Define FCT_mod$64r_m as FCT_mod$r_m for i386.
index 62643c81b204bb2b2d1fff3e99d626323ef26eca..dabd8a4e47db36f6be482f364a457a3317a12745 100644 (file)
@@ -37,8 +37,8 @@
 #include <inttypes.h>
 #include "bpf.h"
 
-#include "../libelf/common.h"
-#include "../libebl/libeblP.h"
+#include "common.h"
+#include "libeblP.h"
 
 static const char class_string[8][8] = {
   [BPF_LD]    = "ld",
index 599d16549ddc2fc3e4911fb443f4900e36fd0e82..c42f8d1cc1974b4ed5ed204f2cfe98ad280272c1 100644 (file)
@@ -41,7 +41,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "../libebl/libeblP.h"
+#include "libeblP.h"
 
 #define MACHINE_ENCODING LITTLE_ENDIAN
 #include "memory-access.h"
index 7175c077062d4a3ef3efa78684e37a7b2523b8c7..823fe9ca05616362c6dd06ac48070b16c532d692 100644 (file)
@@ -39,7 +39,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "../libebl/libeblP.h"
+#include "libeblP.h"
 
 #define MACHINE_ENCODING LITTLE_ENDIAN
 #include "memory-access.h"
index 019c6580d59b456adf38e3dca4ca7c26c46aff73..4c7af94eda70486ea1cb25ee3cee58aeb1064252 100644 (file)
@@ -1,3 +1,10 @@
+2022-12-20  Mark Wielaard  <mark@klomp.org>
+
+       * Makefile.am (AM_CPPFLAGS): Add -I$(srcdir)/../libebl.
+       * cfi.c: Include libebl.h.
+       * encoded-value.h: Likewise.
+       * frame-cache.h: Likewise.
+
 2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
 
        * memory-access.h (get_uleb128_step): Use __typeof.
index 4fda33bd072d11cdf960a0608b87d8a6c4edf8bb..1b6fead4bcf32444299edad6c90c8781896052f2 100644 (file)
@@ -31,7 +31,7 @@ include $(top_srcdir)/config/eu.am
 if BUILD_STATIC
 AM_CFLAGS += $(fpic_CFLAGS)
 endif
-AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdwelf -pthread
+AM_CPPFLAGS += -I$(srcdir)/../libebl -I$(srcdir)/../libelf -I$(srcdir)/../libdwelf -pthread
 VERSION = 1
 
 lib_LIBRARIES = libdw.a
index a73fb03f73e5deb104e0cb10086b1d7050131ab6..6d08ca90d87df1135e80aaed3e99d5ffc6f5a68b 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include <dwarf.h>
-#include "../libebl/libebl.h"
+#include "libebl.h"
 #include "cfi.h"
 #include "memory-access.h"
 #include "encoded-value.h"
index f0df4cec3e2753d961c6ed832f57ac46a97ad1db..d4e01924d6f74f434a28a7de658fb9cca92469dc 100644 (file)
@@ -32,7 +32,7 @@
 #include <dwarf.h>
 #include <stdlib.h>
 #include "libdwP.h"
-#include "../libelf/common.h"
+#include "common.h"
 
 
 /* Returns zero if the value is omitted, the encoding is unknown or
index 5b6afb5d2e623ecab815fde13a04d9eb16c87fca..683f7f17ae9f881d7d21ac1a8507c826bd75b5bb 100644 (file)
@@ -30,7 +30,7 @@
 # include <config.h>
 #endif
 
-#include "../libebl/libebl.h"
+#include "libebl.h"
 #include "cfi.h"
 #include <search.h>
 #include <stdlib.h>
index 5d61aa85d5a9aca3987c70a8f12972d65aebe01e..1940629f0ed41b1346d9a5867dd330fb84a0133b 100644 (file)
@@ -1,3 +1,7 @@
+2022-12-20  Mark Wielaard  <mark@klomp.org>
+
+       * libdwelfP.h: Include libdwP.h.
+
 2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
 
        * dwelf_elf_begin.c: Don't include unistd.h.
index d83c759a7e510efcd3950ffaf19f47d1eb56ef0b..faaf1a20244d63e862cd65d6aee2003b15a6dd4d 100644 (file)
@@ -30,7 +30,7 @@
 #define _LIBDWELFP_H   1
 
 #include <libdwelf.h>
-#include "../libdw/libdwP.h"   /* We need its INTDECLs.  */
+#include "libdwP.h"    /* We need its INTDECLs.  */
 #include <assert.h>
 #include <string.h>
 
index 685273276a1c9b182289d4b075ff93161b5a36fc..1b465e481f46edd80fbe0509b95eb435d6cce261 100644 (file)
@@ -1,3 +1,27 @@
+2022-12-20  Mark Wielaard  <mark@klomp.org>
+
+       * Makefile.am (AM_CPPFLAGS): debuginfod.h is in builddir.
+       * core-file.c: Include libelfP.h.
+       * cu.c: Include libdwP.h and memory-access.h.
+       * debuginfod-client.c: Include debuginfod.h.
+       * dwfl_dwarf_line.c: Include libdwP.h.
+       * dwfl_lineinfo.c: Include libdwP.h.
+       * dwfl_module.c: Include cfi.h.
+       * dwfl_module_dwarf_cfi.c: Include cfi.h.
+       * dwfl_module_eh_cfi.c: Include cfi.h.
+       * dwfl_module_getdwarf.c: Include libdwP.h and libelfP.h.
+       * dwfl_module_getsrc.c: Include libdwP.h.
+       * dwfl_module_getsrc_file.c: Include libdwP.h.
+       * dwfl_segment_report_module.c: Include libelfP.h.
+       * elf-from-memory.c: Include libelfP.h.
+       * frame_unwind.c: Include dwarf.h.
+       * libdwflP.h: Include libdwP.h and libdwelfP.h. Don't include
+       debuginfod.h.
+       * lines.c: Include libdwP.h.
+       * link_map.c: Include memory-access.h.
+       * linux-core-attach.c: Include memory-access.h.
+       * open.c: Include libelfP.h.
+
 2022-11-28  Gavin Li  <gavin@matician.com>
            Mark Wielaard  <mark@klomp.org>
 
index 3278358d80271053bd9f7095ba2dbd0eeb803ce5..6b26cd515af28d3a72e19e51fad47a459dcd5484 100644 (file)
@@ -31,7 +31,7 @@
 ##
 include $(top_srcdir)/config/eu.am
 AM_CPPFLAGS += -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
-          -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf -I$(srcdir)/../debuginfod
+          -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf -I$(builddir)/../debuginfod
 VERSION = 1
 
 noinst_LIBRARIES = libdwfl.a
index cd9b4f38814096c232954d738835708dd23b3bd0..1ddf0f187c4c2032609bc5b0cfbfe84cfd0fe9b7 100644 (file)
@@ -28,7 +28,7 @@
    not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
-#include "../libelf/libelfP.h" /* For NOTE_ALIGN.  */
+#include "libelfP.h"   /* For NOTE_ALIGN.  */
 #undef _
 #include "libdwflP.h"
 #include <gelf.h>
index 4de66248bd2c8b00eae7c8add0bcb7acd006ac08..b1afb19a9623456c6538708f7b1434ea24d7ed21 100644 (file)
@@ -31,8 +31,8 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/libdwP.h"
-#include "../libdw/memory-access.h"
+#include "libdwP.h"
+#include "memory-access.h"
 #include <search.h>
 
 
index d581daabf4f800bb0adbe634c87d1a2d102009ab..882a5efff9bbc622c0fcce90c021b18530b341ec 100644 (file)
@@ -35,6 +35,8 @@
 
 #ifdef ENABLE_LIBDEBUGINFOD
 
+#include "debuginfod.h"
+
 #include <pthread.h>
 #include <dlfcn.h>
 
index e22e984c5029f9e3c077fd382ae95234010930b3..5084c65908f8ef188ac4331f5bbe28cc96bf04c3 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/libdwP.h"
+#include "libdwP.h"
 
 Dwarf_Line *
 dwfl_dwarf_line (Dwfl_Line *line, Dwarf_Addr *bias)
index 961871287822b96a9ea2d5b21525cc7275c40149..85c4b314da271e08ee411c79d2e896096e713904 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/libdwP.h"
+#include "libdwP.h"
 
 const char *
 dwfl_lineinfo (Dwfl_Line *line, Dwarf_Addr *addr, int *linep, int *colp,
index 4fbff33ee55263efb5daaba64ec328714815ab41..221d726da6e57bb8ad65a70e7b7f6ab59d51914e 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/cfi.h"
+#include "cfi.h"
 #include <search.h>
 
 static void
index 0e5b435615967acb0004eff7c64271541ab27f22..05a14f7c4e6a2386ab594b98198e4df5e60823c6 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/cfi.h"
+#include "cfi.h"
 
 Dwarf_CFI *
 internal_function
index c296e399714860886ccd55ea7996ecbe4c0d67bd..aac6657d71138efdbb6fcbfefc300d411df0375d 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/cfi.h"
+#include "cfi.h"
 
 Dwarf_CFI *
 dwfl_module_eh_cfi (Dwfl_Module *mod, Dwarf_Addr *bias)
index 498c7cd205f4269ddcee2bde29788c6e0ebc524a..9ba499bbfed34bae5fe12309a6563e753c759bce 100644 (file)
@@ -34,8 +34,8 @@
 #include <inttypes.h>
 #include <fcntl.h>
 #include <string.h>
-#include "../libdw/libdwP.h"   /* DWARF_E_* values are here.  */
-#include "../libelf/libelfP.h"
+#include "libdwP.h"    /* DWARF_E_* values are here.  */
+#include "libelfP.h"
 #include "system.h"
 
 static inline Dwfl_Error
index fc99b163ed48e923139e828acdd687f03c8fe637..73dbf43515ebe77d4629046d9d5d3ba4eea78aef 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/libdwP.h"
+#include "libdwP.h"
 
 Dwfl_Line *
 dwfl_module_getsrc (Dwfl_Module *mod, Dwarf_Addr addr)
index cea2ba4145698f21bd365300bbe7bd890a768f52..513af6b8d067a22f3ccfd1c17a38ca96a3126e82 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/libdwP.h"
+#include "libdwP.h"
 
 
 static inline const char *
index 19fa6ded7ba9bf14267f397ba572ef746b2f7a9f..41285103d31bc19e56a479ce34b5153c8c1fcae3 100644 (file)
@@ -28,7 +28,7 @@
    not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
-#include "../libelf/libelfP.h" /* For NOTE_ALIGN4 and NOTE_ALIGN8.  */
+#include "libelfP.h"   /* For NOTE_ALIGN4 and NOTE_ALIGN8.  */
 #undef _
 #include "libdwflP.h"
 #include "common.h"
index a0ef00146c0eb21296a4c3a40561dbd01cfcc045..f7fb3ab75410c8e1afd141bd3a27ca4009a74d85 100644 (file)
@@ -27,7 +27,7 @@
    not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
-#include "../libelf/libelfP.h"
+#include "libelfP.h"
 #undef _
 
 #include "libdwflP.h"
index 8185d84b27619dd7a413dc5921e034070da72df0..1e2f02553298df693f3790b286dffffaea209049 100644 (file)
@@ -33,7 +33,7 @@
 #include "cfi.h"
 #include <stdlib.h>
 #include "libdwflP.h"
-#include "../libdw/dwarf.h"
+#include "dwarf.h"
 #include <system.h>
 
 /* Maximum number of DWARF expression stack slots before returning an error.  */
index 011b5de9bdb93db600e20fd6e1847e268c719c9e..cdc528d08ed8ab7beff51118226b1f879c4a7b12 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#include "../libdw/libdwP.h"   /* We need its INTDECLs.  */
-#include "../libdwelf/libdwelfP.h"
-
-#ifdef ENABLE_LIBDEBUGINFOD
-#include "../debuginfod/debuginfod.h"
-#endif
+#include "libdwP.h"    /* We need its INTDECLs.  */
+#include "libdwelfP.h"
 
 typedef struct Dwfl_Process Dwfl_Process;
 
index 128c0c977e698af6ceebe514027abc07f6b0afaa..a7f3004affe09156bfd8850ae1275c3a4a8a716d 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #include "libdwflP.h"
-#include "../libdw/libdwP.h"
+#include "libdwP.h"
 
 Dwfl_Error
 internal_function
index 7ec7eca1e310ab69111aac2879f77846656b750c..06d85eb617c9d501e6cb6e4a406067833def32a0 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <config.h>
 #include "libdwflP.h"
-#include "../libdw/memory-access.h"
+#include "memory-access.h"
 #include "system.h"
 
 #include <fcntl.h>
index ee7afa400208c51f0fcc830b5676fed9372009a1..d6f9e97105037e3d9f57ff623b47aa0604b48a85 100644 (file)
@@ -34,7 +34,7 @@
 #include <fcntl.h>
 #include "system.h"
 
-#include "../libdw/memory-access.h"
+#include "memory-access.h"
 
 struct core_arg
 {
index 68b755cd6b859bfa05fc4eddae4f17111c2c231f..32bd7ff8e9767db80717eb24074f8a62c50b1c27 100644 (file)
@@ -31,7 +31,7 @@
 # include <config.h>
 #endif
 
-#include "../libelf/libelfP.h"
+#include "libelfP.h"
 #undef _
 #include "libdwflP.h"