Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp924431rwd; Sun, 14 May 2023 08:59:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/k3nOYV4vm5GuJRzuyi+W1bYYMKEzV1yMVnwQX+6yKCR5VQnn307PQSI/IhRWZES1+KD5 X-Received: by 2002:a05:6a20:3ca8:b0:101:4e04:cef1 with SMTP id b40-20020a056a203ca800b001014e04cef1mr27154451pzj.27.1684079946063; Sun, 14 May 2023 08:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684079946; cv=none; d=google.com; s=arc-20160816; b=Zzo7uCr+nWYT0KTEu71zCVvAeoDUwa+8p0UCp65ZNzBicnUGFY1NqXxW9S9AKyZ2yw Bh+kXzsvjvdslrjxSHLdTM4msIqQHNGnl2AsXZFQhrsPV3swO5/TmfFquVkvthzh4lAR PnddmjIyzgT98NOwI3Lha6xJn1XuVziSmZgnrFlrwpaFkf7m6ZwQfS6e9jZukIQdBmw0 Yl3eLEjgbgdNcyY3OVNDjJBKY9pnvswfoqKyPfyY87xfFDB07K59ekAkFe8OmpdaihDg z3+vSK/6vam0RfjmKg5stWwaFW/4xRMUBJ4XJQOqz9b/EDreDYwuKcDV12rwCrmMJ4fV r9sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d3z8MJf6di8vmBSGY88ZLtGgEgYNjCAA2dSbOxdxTaA=; b=SCm1hiUzZt1oE7fTUbPLzprfWgZRpwTdCfWmvOnbazk/NRPDc5R/hUeLw0irYZxHCs vP73r6iWiF0GYlwpoH+O0sq/Q4ASr1fFpc1hz22V0i3AjdXFq0YcuPEgTqjKYMB7A9TX Vz07Nq2NTk1yleURSUkQ6r/Zvce+1UpUgbG+Zi1ga/7ERtGuGQmef8m+XGjO3fZJVrom hJq1VHaxLOznP4sjM4QG0TqFPg5RWqlXFM6TdOUM+Qws/F9lB2j7yxc7kBLvnGiG1nqk sNdSjDuGwVBffiZ7STOkTif03x8twETvNxIHBYLYCSiUqyKrZ7PNl1CkvAqtu6+QpvxY Rwbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Kev9/qXT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x3-20020a63b343000000b00502d81ecf19si14616010pgt.646.2023.05.14.08.58.51; Sun, 14 May 2023 08:59:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Kev9/qXT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238004AbjENP3J (ORCPT + 99 others); Sun, 14 May 2023 11:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237898AbjENP2o (ORCPT ); Sun, 14 May 2023 11:28:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9C4426BB; Sun, 14 May 2023 08:28:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 21193617ED; Sun, 14 May 2023 15:28:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D070BC433A0; Sun, 14 May 2023 15:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684078088; bh=8ZBP8uGhdn6vymdReCFLqoFR/6d0pI8J40+zPKwqxLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kev9/qXTSyKaeSlY42WQz9vaY+u7B6/qITizsJc1S12FQ8OmG2JxdmXpIJ6DkA8eC TM4willLy7IYQGrRi6sNIDL9zL4cXbmJcn9J2iPj+EnVc95ru6iBcNpLLlKhTGh2uQ UtzZn5Q+Lr6LzP8WcYAVyGglC4un8IZHjngPPVU//yQ5k9WAcAR5VVXham6TKHhejQ u4ih9digWpY2dYt2H2pWkqDmW3+W7HqTtEZXAxJ0cz6rWjzEYUiAJqMLPW/RmE1IXO cS/6kLsTLnwQyg/HVkfmv6iT5HmT2IJO0I+lamUcQe6oCD4KI2IY9XPnPnne36eBuD 79h5tSbzIB6Wg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Pitre , Nicolas Schier , Masahiro Yamada Subject: [PATCH v5 10/21] modpost: rename find_elf_symbol() and find_elf_symbol2() Date: Mon, 15 May 2023 00:27:28 +0900 Message-Id: <20230514152739.962109-11-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230514152739.962109-1-masahiroy@kernel.org> References: <20230514152739.962109-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org find_elf_symbol() and find_elf_symbol2() are not good names. Rename them to find_tosym(), find_fromsym(), respectively. Signed-off-by: Masahiro Yamada --- Changes in v5: - Change the names scripts/mod/modpost.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 3b7b78e69137..0d2c2aff2c03 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1124,8 +1124,8 @@ static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym) * In other cases the symbol needs to be looked up in the symbol table * based on section and address. * **/ -static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr, - Elf_Sym *relsym) +static Elf_Sym *find_tosym(struct elf_info *elf, Elf64_Sword addr, + Elf_Sym *relsym) { Elf_Sym *sym; Elf_Sym *near = NULL; @@ -1168,8 +1168,8 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr, * The ELF format may have a better way to detect what type of symbol * it is, but this works for now. **/ -static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, - unsigned int secndx) +static Elf_Sym *find_fromsym(struct elf_info *elf, Elf_Addr addr, + unsigned int secndx) { Elf_Sym *sym; Elf_Sym *near = NULL; @@ -1207,10 +1207,10 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf, const char *tosym; const char *fromsym; - from = find_elf_symbol2(elf, r->r_offset, fsecndx); + from = find_fromsym(elf, r->r_offset, fsecndx); fromsym = sym_name(elf, from); - to = find_elf_symbol(elf, r->r_addend, sym); + to = find_tosym(elf, r->r_addend, sym); tosym = sym_name(elf, to); /* check whitelist - we may ignore it */ -- 2.39.2