From patchwork Thu Oct 20 18:25:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 59217 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 94D933865483 for ; Thu, 20 Oct 2022 18:26:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94D933865483 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666290404; bh=WFh8wbMIzkHUy5M0JBghNcNJW8d0FP+lkGcS8mwp3YI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:From; b=tfaKaFqjd2jpYtRlAN9Unyal3AnEsD20mJ1tRVGOUDJoPxveQLcTKvjaCIXjjNSFT RDtfYU6NH4KoN5muugEn9OCQRE1tJGwBXlHgGNTLGuVqtwE4TUqVthls1Dlpd7mhHb CjwVfCdbKfmfvQbYTTyyzpog77Lgq0xVRxxCI6qE= X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id A847B384D170 for ; Thu, 20 Oct 2022 18:26:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A847B384D170 Received: by mail-pj1-x1031.google.com with SMTP id o17-20020a17090aac1100b0020d98b0c0f4so4299623pjq.4 for ; Thu, 20 Oct 2022 11:26:34 -0700 (PDT) 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=WFh8wbMIzkHUy5M0JBghNcNJW8d0FP+lkGcS8mwp3YI=; b=JuvyGPnLljX/7feOAoLueJCkBnrUjy0+6XHxEg1oLYz4lZdYRi4dCdNFMWsbbJzGuR M6OYYesEC6JVbN0N9r+7lQCl/YfuJIURRvKFhlkcMofG5gKQG/Yk3aUPTse+F5CCI2KO Ymf/4vOwPyggpo/wLSg3Wu+GUj1gsYiPN+cEMOcDD2bUeGvwdwnIKRxjUueghHEtWJpX 3eDixoVwtc7uIlmeRpnw1IHO2geacg2oGAIeaCH4+Fm8tdv/kqD2dew/+6xNzclodau3 MBfg5McBVmnDACI15OXbJ15QJwCBto1NwjUme4sEle8FhEWObkffwDidKoMyhsg/K3bf ZObQ== X-Gm-Message-State: ACrzQf3PlM4igGrS66Xlo1m9PJgizOXsc2ZipREikEbmwQ+rbMxu0WkQ 2jF1h5v3ud1/9VuvIAmFlpA+Mc/FWSHhRw== X-Google-Smtp-Source: AMsMyM4q+vGkdu1gSeeWY1LTqt6bbRwSxSXSCSFYL5WTQwQUsHTa2kECugaeIXvQjUmIZMSDJsD1Vg== X-Received: by 2002:a17:90b:4c52:b0:20d:489b:5607 with SMTP id np18-20020a17090b4c5200b0020d489b5607mr17354384pjb.40.1666290393110; Thu, 20 Oct 2022 11:26:33 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:26:32 -0700 (PDT) To: elfutils-devel@sourceware.org Subject: [PATCH 06/25] move platform depended include into system.h of libebl Date: Fri, 21 Oct 2022 02:25:45 +0800 Message-Id: <20221020182603.815-7-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 X-Spam-Status: No, score=-10.8 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 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Yonggang Luo via Elfutils-devel From: Yonggang Luo Reply-To: Yonggang Luo Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org Sender: "Elfutils-devel" Because all source in libebl #include , so #include 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 -#include -#include #include #include #include + #include #define AUXV_TYPES \ diff --git a/libebl/eblcorenote.c b/libebl/eblcorenote.c index 7fab3974..9573e93e 100644 --- a/libebl/eblcorenote.c +++ b/libebl/eblcorenote.c @@ -31,12 +31,11 @@ #endif #include -#include -#include #include #include #include #include + #include diff --git a/libebl/ebldynamictagname.c b/libebl/ebldynamictagname.c index 5d4a3a58..018a2ff7 100644 --- a/libebl/ebldynamictagname.c +++ b/libebl/ebldynamictagname.c @@ -33,8 +33,8 @@ #include #include + #include -#include "system.h" const char * diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c index 5a7c5c62..83ac4f47 100644 --- a/libebl/eblobjnote.c +++ b/libebl/eblobjnote.c @@ -35,13 +35,13 @@ #include #include #include -#include -#include "common.h" -#include "libelfP.h" -#include "libdwP.h" -#include "memory-access.h" +#include +#include "../libelf/common.h" +#include "../libelf/libelfP.h" +#include "../libdw/libdwP.h" +#include "../libdw/memory-access.h" void ebl_object_note (Ebl *ebl, uint32_t namesz, const char *name, uint32_t type, diff --git a/libebl/eblobjnotetypename.c b/libebl/eblobjnotetypename.c index 473a1f2f..c15379d6 100644 --- a/libebl/eblobjnotetypename.c +++ b/libebl/eblobjnotetypename.c @@ -31,11 +31,10 @@ # include #endif -#include - #include #include #include + #include diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c index 02f80653..7dc760d8 100644 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@ -31,15 +31,15 @@ #endif #include -#include #include #include #include #include -#include #include +#include "../libelf/libelfP.h" + Ebl *i386_init (Elf *, GElf_Half, Ebl *); Ebl *sh_init (Elf *, GElf_Half, Ebl *); Ebl *x86_64_init (Elf *, GElf_Half, Ebl *); diff --git a/libebl/eblresolvesym.c b/libebl/eblresolvesym.c index 470f6f06..b859bba3 100644 --- a/libebl/eblresolvesym.c +++ b/libebl/eblresolvesym.c @@ -30,9 +30,10 @@ # include #endif -#include #include +#include + bool ebl_resolve_sym_value (Ebl *ebl, GElf_Addr *addr) { diff --git a/libebl/libeblP.h b/libebl/libeblP.h index c408ed97..14cb70f3 100644 --- a/libebl/libeblP.h +++ b/libebl/libeblP.h @@ -30,9 +30,11 @@ #define _LIBEBLP_H 1 #include -#include #include +#include + +#include <../libasm/libasm.h> /* Backend handle. */ struct ebl