]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
lib{asm,cpu,dw,dwfl,dwelf}: Move platform depended include into system.h
authorYonggang Luo <luoyonggang@gmail.com>
Thu, 20 Oct 2022 18:25:46 +0000 (02:25 +0800)
committerMark Wielaard <mark@klomp.org>
Fri, 28 Oct 2022 12:05:07 +0000 (14:05 +0200)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
37 files changed:
lib/ChangeLog
lib/color.c
libasm/ChangeLog
libasm/asm_abort.c
libasm/asm_addint8.c
libasm/asm_begin.c
libasm/asm_end.c
libasm/libasmP.h
libcpu/ChangeLog
libcpu/i386_disasm.c
libcpu/memory-access.h
libdw/ChangeLog
libdw/dwarf_begin_elf.c
libdw/dwarf_end.c
libdw/dwarf_setalt.c
libdw/libdw_find_split_unit.c
libdwelf/ChangeLog
libdwelf/dwelf_elf_begin.c
libdwelf/dwelf_strtab.c
libdwfl/ChangeLog
libdwfl/argp-std.c
libdwfl/core-file.c
libdwfl/dwfl_build_id_find_debuginfo.c
libdwfl/dwfl_build_id_find_elf.c
libdwfl/dwfl_end.c
libdwfl/dwfl_frame.c
libdwfl/dwfl_module.c
libdwfl/dwfl_module_getdwarf.c
libdwfl/dwfl_report_elf.c
libdwfl/dwfl_segment_report_module.c
libdwfl/find-debuginfo.c
libdwfl/gzip.c
libdwfl/image-header.c
libdwfl/link_map.c
libdwfl/linux-pid-attach.c
libdwfl/offline.c
libdwfl/open.c

index ab555c17efcf0f87c3570621d2af9059e28e4cfb..6bb0d4d068de3552c5b4fa581c55a34238251f34 100644 (file)
@@ -1,3 +1,7 @@
+2022-09-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * color.c: Don't include unistd.h.
+
 2022-09-20  Yonggang Luo  <luoyonggang@gmail.com>
 
        * system.h: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
index bd105ec276a84633fdf3e8defd210f56f1791c06..8063dc26221e22bdc45f0c4b1d17ac745188578f 100644 (file)
@@ -34,7 +34,6 @@
 #include <argp.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include "system.h"
 #include "libeu.h"
 #include "color.h"
index c65fd21b83848028e408b08d43421e391bc0d4e1..ce0f24f46af78f6ca4cd382ff741075c8c7ed68e 100644 (file)
@@ -1,3 +1,11 @@
+2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * asm_abort.c: Don't include unistd.h.
+       * asm_addint8.c: Don't include byteswap.h and endian.h.
+       * asm_begin.c: Don't include unistd.h and system.h.
+       * asm_end.c: Likewise.
+       * libasmP.h: Include system.h.
+
 2021-09-06  Dmitry V. Levin  <ldv@altlinux.org>
 
        * asm_align.c (__libasm_ensure_section_space): Remove casts of calloc
index 12743dc6cb784c1e7fd62af93a39922194679507..696298c41ec6da95d7692062f951af9ea0c05acd 100644 (file)
@@ -32,7 +32,6 @@
 #endif
 
 #include <stdlib.h>
-#include <unistd.h>
 
 #include <libasmP.h>
 #include <libelf.h>
index bb7d40f228f651acfaeb1bda74cc8c44c5f59fca..7f823e09cf42a035fb0190cdc0d66732764690b7 100644 (file)
@@ -31,8 +31,6 @@
 # include <config.h>
 #endif
 
-#include <byteswap.h>
-#include <endian.h>
 #include <inttypes.h>
 #include <string.h>
 
index a190202c62bac0cd3765f3ea60fafa3db7301324..9e4dfe431832353789c162f9969580c71055f9a6 100644 (file)
 #include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 
 #include <gelf.h>
 #include "libasmP.h"
-#include <system.h>
 
 
 static AsmCtx_t *
index a26120f26291ed4a3fcfd66ca21ed388c8abf0fc..c06d2366ade924967eab61414a4fe578eaf80c30 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <sys/stat.h>
 
 #include <libasmP.h>
 #include <libelf.h>
-#include <system.h>
 
 
 static int
index 5b5fb7767737aebc95e3e31f8f510c2ea8a22b5f..11f42511ac23876c5b03960b559d6163d008092b 100644 (file)
@@ -32,6 +32,9 @@
 #include <stdio.h>
 
 #include <libasm.h>
+
+#include <system.h>
+
 #include "libebl.h"
 
 #include "libdwelf.h"
index 93c4b72f2edda5d5f1ff8ef12e7780ad2ebb1b6b..06ffe02fda024604c0c0b6346b6dae54d5f5ec12 100644 (file)
@@ -1,3 +1,9 @@
+2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * i386_disasm.c: Don't include endian.h.
+       * memory-access.h: Don't include byteswap.h and endian.h.
+       Do include system.h.
+
 2022-09-20  Yonggang Luo  <luoyonggang@gmail.com>
 
        * memory-access.h: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
index 40475b81d7c049ecae8c3e926cc6f8fb2e7478f0..599d16549ddc2fc3e4911fb443f4900e36fd0e82 100644 (file)
@@ -34,7 +34,6 @@
 #include <assert.h>
 #include <config.h>
 #include <ctype.h>
-#include <endian.h>
 #include <errno.h>
 #include <gelf.h>
 #include <stddef.h>
index 3b6ca19baaf6528537556920e44312a29b296732..6e92fc5b7a65acf5959f20f0cfbac63dcf9ec6b4 100644 (file)
 #ifndef _MEMORY_ACCESS_H
 #define _MEMORY_ACCESS_H 1
 
-#include <byteswap.h>
-#include <endian.h>
 #include <limits.h>
 #include <stdint.h>
 
+#include <system.h>
 
 /* When loading this file we require the macro MACHINE_ENCODING to be
    defined to signal the endianness of the architecture which is
index 9bce3921a59ec6b88795464cd49c52c786bba38a..3c595a3d24d350ab96f85abe2c847ea0cc0b3e7f 100644 (file)
@@ -1,3 +1,10 @@
+2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * dwarf_begin_elf.h: Don't include unistd.h and endian.h.
+       * dwarf_end.c: Don't include unistd.h.
+       * dwarf_setalt.c: Likewise.
+       * libdw_find_split_unit.c: Likewise.
+
 2022-10-19  Mark Wielaard  <mark@klomp.org>
 
        * dwarf.h (DW_LLE_GNU_view_pair): New constant.
index a48dada6fe1e8404fad9f154b8ce3990d8d3578c..8fcef335efbb45feb158571f51f941b4a596dbc5 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <endian.h>
 
 #include "libelfP.h"
 #include "libdwP.h"
index 77f537a78e5623e7dd49f4e4f3d2fce4d3d6de91..8dd075cf6b29fc0e50be32f5785acfefcc48cf62 100644 (file)
@@ -35,7 +35,6 @@
 #include <stdlib.h>
 #include <assert.h>
 #include <string.h>
-#include <unistd.h>
 
 #include "libdwP.h"
 #include "cfi.h"
index 9051b8e0d79d21bca6a2704dac2b00b76b56b73e..dc9b61cb0f355d60550c8ae486fce696d45e483b 100644 (file)
@@ -32,8 +32,6 @@
 
 #include "libdwP.h"
 
-#include <unistd.h>
-
 void
 dwarf_setalt (Dwarf *main, Dwarf *alt)
 {
index da039e50ac2ba757686e8b062467099c15d68df6..a22e7bc90b23614bedcd982f248082c0d14c0c57 100644 (file)
@@ -40,7 +40,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <unistd.h>
 
 void
 try_split_file (Dwarf_CU *cu, const char *dwo_path)
index d5800751c258bc1abc94e9d117b4cea95c7d9537..5d61aa85d5a9aca3987c70a8f12972d65aebe01e 100644 (file)
@@ -1,3 +1,8 @@
+2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * dwelf_elf_begin.c: Don't include unistd.h.
+       * dwelf_strtab.c: Likewise.
+
 2022-08-08  Andreas Schwab  <schwab@suse.de>
 
        * dwelf_elf_e_machine_string.c (dwelf_elf_e_machine_string): Add
index c3cfe633a8483b1be1e6a29b467572ba805a2eae..17a90fc96f5c1b00c9a4b3b971715e30b2839587 100644 (file)
@@ -34,8 +34,6 @@
 #include "libdwflP.h"
 #include "libelfP.h"
 
-#include <unistd.h>
-
 NEW_VERSION (dwelf_elf_begin, ELFUTILS_0.177)
 Elf *
 dwelf_elf_begin (int fd)
index 5ec8c295fac3b257b20372800f998d4afe0561a9..c95f9467d4d52eb075378469cdda9cd5de3ad39e 100644 (file)
@@ -37,7 +37,6 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 
 #include "libdwelfP.h"
 #include <system.h>
index 5254ac4553adfe461a541746b599736c38654e96..6dd84a6f83f18d73ae64c8e5c42ea59137815324 100644 (file)
@@ -1,3 +1,24 @@
+2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * argp-std.c: Don't include unistd.h.
+       * core-file.c: Don't include unistd.h, endian.h, byteswap.h and
+       system.h.
+       * dwfl_build_id_find_debuginfo.c: Don't include unistd.h.
+       * dwfl_build_id_find_elf.c: Likewise.
+       * dwfl_end.c: Likewise.
+       * dwfl_frame.c: Likewise.
+       * dwfl_module.c: Likewise.
+       * dwfl_module_getdwarf.c: Likewise.
+       * dwfl_report_elf.c: Likewise.
+       * dwfl_segment_report_module.c: Don't include endian.h and unistd.h.
+       * find-debuginfo.c: Don't include unistd.h.
+       * gzip.c: Likewise.
+       * image-header.c: Don't include system.h, unistd.h and endian.h.
+       * link_map.c: Don't include byteswap.h and endian.h.
+       * linux-pid-attach.c: Don't include unistd.h.
+       * offline.c: Likewise.
+       * open.c: Likewise.
+
 2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
 
        * libdwfl_crc32.c: Remove LIB_SYSTEM_H define.
index bc013aa097f88fb35c3f1fdd694fad4507b651c3..1605fbfeca717963c9f90638741817ddb747873d 100644 (file)
@@ -35,7 +35,6 @@
 #include <stdlib.h>
 #include <assert.h>
 #include <fcntl.h>
-#include <unistd.h>
 
 
 #define OPT_DEBUGINFO  0x100
index 4418ef33817080627ebe00d05d18f6d5d3c0ecca..cd9b4f38814096c232954d738835708dd23b3bd0 100644 (file)
 #include "libdwflP.h"
 #include <gelf.h>
 
-#include <unistd.h>
-#include <endian.h>
-#include <byteswap.h>
-#include "system.h"
-
-
 /* On failure return, we update *NEXT to point back at OFFSET.  */
 static inline Elf *
 do_fail (int error, off_t *next, off_t offset)
index 273e5e5f1d02f8882b9832f32e296f53238f344e..856f2312c7d09a4f4cf06f8d7376f04483834c34 100644 (file)
@@ -31,8 +31,6 @@
 #endif
 
 #include "libdwflP.h"
-#include <unistd.h>
-
 
 int
 dwfl_build_id_find_debuginfo (Dwfl_Module *mod,
index 7b604d47e970ccc9c40ef67926d65f62dce9805c..35bc8c9ee2e05d1f44a756f6971a67abae37185e 100644 (file)
@@ -33,7 +33,6 @@
 #include "libdwflP.h"
 #include <inttypes.h>
 #include <fcntl.h>
-#include <unistd.h>
 #include "system.h"
 
 
index b1840191fb17f972ef8f787c9c4d548f86c761fa..a18124077751452565a9e0b3e8c080479e64c2b4 100644 (file)
@@ -31,7 +31,6 @@
 #endif
 
 #include "libdwflP.h"
-#include <unistd.h>
 
 void
 dwfl_end (Dwfl *dwfl)
index 77e0c5cb6f7128a25ccccb86d0cb2b55e47ea26d..5ee71dd4c0110a210b536e016b126efd535fd4c2 100644 (file)
@@ -33,7 +33,6 @@
 #include <system.h>
 
 #include "libdwflP.h"
-#include <unistd.h>
 
 /* Set STATE->pc_set from STATE->regs according to the backend.  Return true on
    success, false on error.  */
index e7dfdace70502344f1f83bbc70f6c817c8c9d962..4fbff33ee55263efb5daaba64ec328714815ab41 100644 (file)
@@ -33,7 +33,6 @@
 #include "libdwflP.h"
 #include "../libdw/cfi.h"
 #include <search.h>
-#include <unistd.h>
 
 static void
 free_cu (struct dwfl_cu *cu)
index 6f076057d17e0e80b28eb73c4ae7bbf49d07b8ff..498c7cd205f4269ddcee2bde29788c6e0ebc524a 100644 (file)
@@ -34,7 +34,6 @@
 #include <inttypes.h>
 #include <fcntl.h>
 #include <string.h>
-#include <unistd.h>
 #include "../libdw/libdwP.h"   /* DWARF_E_* values are here.  */
 #include "../libelf/libelfP.h"
 #include "system.h"
index a5f0e5e55e1375e83c4a5f836e46f6f92628c840..581f407933e803273bfdbda0640616384f9fc011 100644 (file)
@@ -32,8 +32,6 @@
 
 #include "libdwflP.h"
 #include <fcntl.h>
-#include <unistd.h>
-
 
 /* We start every ET_REL module at a moderately aligned boundary.
    This keeps the low addresses easy to read compared to a layout
index 28f87f10dd3962082ec4b995f43069ffc4b5e3d4..287fc002d8d3fda7d9926f6b3e01760c4e2e7f66 100644 (file)
@@ -36,8 +36,6 @@
 #include <elf.h>
 #include <gelf.h>
 #include <inttypes.h>
-#include <endian.h>
-#include <unistd.h>
 #include <fcntl.h>
 
 #include <system.h>
index 449df5a14b19bedf2795498dd9523342a2382b00..7f7ab632dac835f40b4f2c7010623cfa7a24c905 100644 (file)
@@ -33,7 +33,6 @@
 #include "libdwflP.h"
 #include <stdio.h>
 #include <fcntl.h>
-#include <unistd.h>
 #include <sys/stat.h>
 #include "system.h"
 
index ba8ecfba6c316b261ee38bb288ab163664ade9e5..53013be3cce440e3995051223f0e810888611f77 100644 (file)
@@ -33,8 +33,6 @@
 #include "libdwflP.h"
 #include "system.h"
 
-#include <unistd.h>
-
 #ifdef LZMA
 # define USE_INFLATE   1
 # include <lzma.h>
index f906068ab50a4ab2f18ad8a7eed45d529be22851..c777cc84959938c8e4d1d23cb0138745af06b4fc 100644 (file)
 #endif
 
 #include "libdwflP.h"
-#include "system.h"
-
-#include <unistd.h>
-#include <endian.h>
 
 #if BYTE_ORDER == LITTLE_ENDIAN
 # define LE16(x)       (x)
index c0207cd39e8f411f7da05d3dfcd634a9f928cc96..7ec7eca1e310ab69111aac2879f77846656b750c 100644 (file)
@@ -32,8 +32,6 @@
 #include "../libdw/memory-access.h"
 #include "system.h"
 
-#include <byteswap.h>
-#include <endian.h>
 #include <fcntl.h>
 
 /* This element is always provided and always has a constant value.
index 09cba07b1a25a1b0d92a14bc366ae6c45498b1ed..de8678572d1222245ce7f7ee0ad233dbe2d86573 100644 (file)
@@ -38,7 +38,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <dirent.h>
-#include <unistd.h>
 
 #ifdef __linux__
 
index 499663e39e3f037394a8d69be069bab2f3ae9776..e090b42bb5136d06d0a005ecea0b2d873e4afbc2 100644 (file)
@@ -34,7 +34,6 @@
 
 #include "libdwflP.h"
 #include <fcntl.h>
-#include <unistd.h>
 
 /* Since dwfl_report_elf lays out the sections already, this will only be
    called when the section headers of the debuginfo file are being
index da8b59a32a84307a1c32012903c31b2e5074b321..68b755cd6b859bfa05fc4eddae4f17111c2c231f 100644 (file)
@@ -35,8 +35,6 @@
 #undef _
 #include "libdwflP.h"
 
-#include <unistd.h>
-
 #if !USE_BZLIB
 # define __libdw_bunzip2(...)  DWFL_E_BADELF
 #endif