From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id E8DA0384D17E for ; Thu, 20 Oct 2022 18:26:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E8DA0384D17E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x631.google.com with SMTP id l4so89592plb.8 for ; Thu, 20 Oct 2022 11:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2oTBvKWwajscl3/NopDbsnH8O/rKmw1Gh8vRSZH5rc4=; b=Ep6iY/4ZX5Ye8R2onyJ/x6kI8YpfEHaj/QR8H5t0zKhz5w48TXqFnoQXfpECzoRV/y xGARGCjV5HwiI0H26nxKxDyGMn1oBjNqPZ2VFiewiG7jhMg/jC6uHLZ/pv4LbLw2t+Gz HzX//CastA8oy+zFChEoXsd8c3GHtQl2+gH5vGQBXl8HXVqe1YHeVaWWan3/GEbTvHiv yElRf/zRvCWmbc1jUnXThq+YnCKcaBaqTNHtZdAqqw38I/2ac6WevGXVZ1KepODhLEVM /grb0vqTZQOBeM4ubgmclgTVV3A3soNACjgUzGaQYMrRhuOVdXP/2dxAugpNLVJ4ldfb I+Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2oTBvKWwajscl3/NopDbsnH8O/rKmw1Gh8vRSZH5rc4=; b=u21ETmXj9EwqqKv/IGsn15QXqVCYmASpA9mZVHaJIJHtDNCLkwYZvnZ9bShekNSOMi PQRDcoh7Mc8/0KbsWr8PxvWtQ+t6mpnMQJ+cK5TI2bON1yUZVAFwtli/n6wMFVvFfWqy UiIrEgcWZ/SZNeJBhOWb9lWVzxMbZyl90NkBv+JitLPT7zYXYQZ13xWnyNQ9Caaj7Irx 4S2Ytq4JSV4Pgka7sdDTmsXWYvkVeWUFBmkNZUQNimZmrdjvS3Ka4HlEqe8ZwNtcayGz aWjWutEgxhYDbMzTHkiSFlseTDar3HfHr25kL2Flu35wx0duye+ACf4lLn+LGfTXlW0d 5IaA== X-Gm-Message-State: ACrzQf2SVX58UZ215kE9Gb5z2worxUnaR5BHUprZwRPL/5ycOMthpnUv CWKNkEJx08kE+bS0SVszw1LxGmkwTSLgxA== X-Google-Smtp-Source: AMsMyM4zgrR4DdXSOjJMDItfsJmTc317RbSRIO/QzFaOoIX3MHrcNeNHyww0BxnDrPUn4zC4Wr3Xsg== X-Received: by 2002:a17:902:8f91:b0:184:d3ed:afd8 with SMTP id z17-20020a1709028f9100b00184d3edafd8mr15232532plo.15.1666290395348; Thu, 20 Oct 2022 11:26:35 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id w15-20020a17090a460f00b00202fbd9c21dsm115067pjg.48.2022.10.20.11.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:26:34 -0700 (PDT) From: Yonggang Luo To: elfutils-devel@sourceware.org Cc: Yonggang Luo Subject: [PATCH 07/25] move platform depended include into system.h of libasm, libcpu, libdw, libdwfl and libdwelf Date: Fri, 21 Oct 2022 02:25:46 +0800 Message-Id: <20221020182603.815-8-luoyonggang@gmail.com> X-Mailer: git-send-email 2.36.1.windows.1 In-Reply-To: <20221020182603.815-1-luoyonggang@gmail.com> References: <20221020182603.815-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Signed-off-by: Yonggang Luo --- lib/color.c | 1 - libasm/asm_abort.c | 1 - libasm/asm_addint8.c | 2 -- libasm/asm_begin.c | 2 -- libasm/asm_end.c | 2 -- libasm/libasmP.h | 3 +++ libcpu/i386_disasm.c | 1 - libcpu/memory-access.h | 3 +-- libdw/dwarf_begin_elf.c | 2 -- libdw/dwarf_end.c | 1 - libdw/dwarf_setalt.c | 2 -- libdw/libdw_find_split_unit.c | 1 - libdwelf/dwelf_elf_begin.c | 2 -- libdwelf/dwelf_strtab.c | 1 - libdwfl/argp-std.c | 1 - libdwfl/core-file.c | 6 ------ libdwfl/dwfl_build_id_find_debuginfo.c | 2 -- libdwfl/dwfl_build_id_find_elf.c | 1 - libdwfl/dwfl_end.c | 1 - libdwfl/dwfl_frame.c | 1 - libdwfl/dwfl_module.c | 1 - libdwfl/dwfl_module_getdwarf.c | 1 - libdwfl/dwfl_report_elf.c | 2 -- libdwfl/dwfl_segment_report_module.c | 2 -- libdwfl/find-debuginfo.c | 1 - libdwfl/gzip.c | 2 -- libdwfl/image-header.c | 4 ---- libdwfl/link_map.c | 2 -- libdwfl/linux-pid-attach.c | 1 - libdwfl/offline.c | 1 - libdwfl/open.c | 2 -- 31 files changed, 4 insertions(+), 51 deletions(-) diff --git a/lib/color.c b/lib/color.c index bd105ec2..8063dc26 100644 --- a/lib/color.c +++ b/lib/color.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "system.h" #include "libeu.h" #include "color.h" diff --git a/libasm/asm_abort.c b/libasm/asm_abort.c index 12743dc6..696298c4 100644 --- a/libasm/asm_abort.c +++ b/libasm/asm_abort.c @@ -32,7 +32,6 @@ #endif #include -#include #include #include diff --git a/libasm/asm_addint8.c b/libasm/asm_addint8.c index bb7d40f2..7f823e09 100644 --- a/libasm/asm_addint8.c +++ b/libasm/asm_addint8.c @@ -31,8 +31,6 @@ # include #endif -#include -#include #include #include diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c index a190202c..9e4dfe43 100644 --- a/libasm/asm_begin.c +++ b/libasm/asm_begin.c @@ -37,11 +37,9 @@ #include #include #include -#include #include #include "libasmP.h" -#include static AsmCtx_t * diff --git a/libasm/asm_end.c b/libasm/asm_end.c index a26120f2..c06d2366 100644 --- a/libasm/asm_end.c +++ b/libasm/asm_end.c @@ -35,12 +35,10 @@ #include #include #include -#include #include #include #include -#include static int diff --git a/libasm/libasmP.h b/libasm/libasmP.h index 5b5fb776..11f42511 100644 --- a/libasm/libasmP.h +++ b/libasm/libasmP.h @@ -32,6 +32,9 @@ #include #include + +#include + #include "libebl.h" #include "libdwelf.h" diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c index 40475b81..599d1654 100644 --- a/libcpu/i386_disasm.c +++ b/libcpu/i386_disasm.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/libcpu/memory-access.h b/libcpu/memory-access.h index 3b6ca19b..6e92fc5b 100644 --- a/libcpu/memory-access.h +++ b/libcpu/memory-access.h @@ -29,11 +29,10 @@ #ifndef _MEMORY_ACCESS_H #define _MEMORY_ACCESS_H 1 -#include -#include #include #include +#include /* When loading this file we require the macro MACHINE_ENCODING to be defined to signal the endianness of the architecture which is diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c index a48dada6..8fcef335 100644 --- a/libdw/dwarf_begin_elf.c +++ b/libdw/dwarf_begin_elf.c @@ -38,11 +38,9 @@ #include #include #include -#include #include #include #include -#include #include "libelfP.h" #include "libdwP.h" diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c index 77f537a7..8dd075cf 100644 --- a/libdw/dwarf_end.c +++ b/libdw/dwarf_end.c @@ -35,7 +35,6 @@ #include #include #include -#include #include "libdwP.h" #include "cfi.h" diff --git a/libdw/dwarf_setalt.c b/libdw/dwarf_setalt.c index 9051b8e0..dc9b61cb 100644 --- a/libdw/dwarf_setalt.c +++ b/libdw/dwarf_setalt.c @@ -32,8 +32,6 @@ #include "libdwP.h" -#include - void dwarf_setalt (Dwarf *main, Dwarf *alt) { diff --git a/libdw/libdw_find_split_unit.c b/libdw/libdw_find_split_unit.c index da039e50..a22e7bc9 100644 --- a/libdw/libdw_find_split_unit.c +++ b/libdw/libdw_find_split_unit.c @@ -40,7 +40,6 @@ #include #include #include -#include void try_split_file (Dwarf_CU *cu, const char *dwo_path) diff --git a/libdwelf/dwelf_elf_begin.c b/libdwelf/dwelf_elf_begin.c index c3cfe633..17a90fc9 100644 --- a/libdwelf/dwelf_elf_begin.c +++ b/libdwelf/dwelf_elf_begin.c @@ -34,8 +34,6 @@ #include "libdwflP.h" #include "libelfP.h" -#include - NEW_VERSION (dwelf_elf_begin, ELFUTILS_0.177) Elf * dwelf_elf_begin (int fd) diff --git a/libdwelf/dwelf_strtab.c b/libdwelf/dwelf_strtab.c index 5ec8c295..c95f9467 100644 --- a/libdwelf/dwelf_strtab.c +++ b/libdwelf/dwelf_strtab.c @@ -37,7 +37,6 @@ #include #include #include -#include #include "libdwelfP.h" #include diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c index bc013aa0..1605fbfe 100644 --- a/libdwfl/argp-std.c +++ b/libdwfl/argp-std.c @@ -35,7 +35,6 @@ #include #include #include -#include #define OPT_DEBUGINFO 0x100 diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c index 4418ef33..cd9b4f38 100644 --- a/libdwfl/core-file.c +++ b/libdwfl/core-file.c @@ -33,12 +33,6 @@ #include "libdwflP.h" #include -#include -#include -#include -#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) diff --git a/libdwfl/dwfl_build_id_find_debuginfo.c b/libdwfl/dwfl_build_id_find_debuginfo.c index 273e5e5f..856f2312 100644 --- a/libdwfl/dwfl_build_id_find_debuginfo.c +++ b/libdwfl/dwfl_build_id_find_debuginfo.c @@ -31,8 +31,6 @@ #endif #include "libdwflP.h" -#include - int dwfl_build_id_find_debuginfo (Dwfl_Module *mod, diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c index 7b604d47..35bc8c9e 100644 --- a/libdwfl/dwfl_build_id_find_elf.c +++ b/libdwfl/dwfl_build_id_find_elf.c @@ -33,7 +33,6 @@ #include "libdwflP.h" #include #include -#include #include "system.h" diff --git a/libdwfl/dwfl_end.c b/libdwfl/dwfl_end.c index b1840191..a1812407 100644 --- a/libdwfl/dwfl_end.c +++ b/libdwfl/dwfl_end.c @@ -31,7 +31,6 @@ #endif #include "libdwflP.h" -#include void dwfl_end (Dwfl *dwfl) diff --git a/libdwfl/dwfl_frame.c b/libdwfl/dwfl_frame.c index 77e0c5cb..5ee71dd4 100644 --- a/libdwfl/dwfl_frame.c +++ b/libdwfl/dwfl_frame.c @@ -33,7 +33,6 @@ #include #include "libdwflP.h" -#include /* Set STATE->pc_set from STATE->regs according to the backend. Return true on success, false on error. */ diff --git a/libdwfl/dwfl_module.c b/libdwfl/dwfl_module.c index e7dfdace..4fbff33e 100644 --- a/libdwfl/dwfl_module.c +++ b/libdwfl/dwfl_module.c @@ -33,7 +33,6 @@ #include "libdwflP.h" #include "../libdw/cfi.h" #include -#include static void free_cu (struct dwfl_cu *cu) diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c index 6f076057..498c7cd2 100644 --- a/libdwfl/dwfl_module_getdwarf.c +++ b/libdwfl/dwfl_module_getdwarf.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */ #include "../libelf/libelfP.h" #include "system.h" diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c index a5f0e5e5..581f4079 100644 --- a/libdwfl/dwfl_report_elf.c +++ b/libdwfl/dwfl_report_elf.c @@ -32,8 +32,6 @@ #include "libdwflP.h" #include -#include - /* We start every ET_REL module at a moderately aligned boundary. This keeps the low addresses easy to read compared to a layout diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c index 28f87f10..287fc002 100644 --- a/libdwfl/dwfl_segment_report_module.c +++ b/libdwfl/dwfl_segment_report_module.c @@ -36,8 +36,6 @@ #include #include #include -#include -#include #include #include diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c index 449df5a1..7f7ab632 100644 --- a/libdwfl/find-debuginfo.c +++ b/libdwfl/find-debuginfo.c @@ -33,7 +33,6 @@ #include "libdwflP.h" #include #include -#include #include #include "system.h" diff --git a/libdwfl/gzip.c b/libdwfl/gzip.c index ba8ecfba..53013be3 100644 --- a/libdwfl/gzip.c +++ b/libdwfl/gzip.c @@ -33,8 +33,6 @@ #include "libdwflP.h" #include "system.h" -#include - #ifdef LZMA # define USE_INFLATE 1 # include diff --git a/libdwfl/image-header.c b/libdwfl/image-header.c index f906068a..c777cc84 100644 --- a/libdwfl/image-header.c +++ b/libdwfl/image-header.c @@ -32,10 +32,6 @@ #endif #include "libdwflP.h" -#include "system.h" - -#include -#include #if BYTE_ORDER == LITTLE_ENDIAN # define LE16(x) (x) diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c index c0207cd3..7ec7eca1 100644 --- a/libdwfl/link_map.c +++ b/libdwfl/link_map.c @@ -32,8 +32,6 @@ #include "../libdw/memory-access.h" #include "system.h" -#include -#include #include /* This element is always provided and always has a constant value. diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c index 09cba07b..de867857 100644 --- a/libdwfl/linux-pid-attach.c +++ b/libdwfl/linux-pid-attach.c @@ -38,7 +38,6 @@ #include #include #include -#include #ifdef __linux__ diff --git a/libdwfl/offline.c b/libdwfl/offline.c index 499663e3..e090b42b 100644 --- a/libdwfl/offline.c +++ b/libdwfl/offline.c @@ -34,7 +34,6 @@ #include "libdwflP.h" #include -#include /* Since dwfl_report_elf lays out the sections already, this will only be called when the section headers of the debuginfo file are being diff --git a/libdwfl/open.c b/libdwfl/open.c index da8b59a3..68b755cd 100644 --- a/libdwfl/open.c +++ b/libdwfl/open.c @@ -35,8 +35,6 @@ #undef _ #include "libdwflP.h" -#include - #if !USE_BZLIB # define __libdw_bunzip2(...) DWFL_E_BADELF #endif -- 2.36.1.windows.1