From patchwork Wed Nov 1 15:03:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 16141 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp485906vqx; Wed, 1 Nov 2023 08:05:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+U5phMkrcuIaqeCvnzYThfJBrVNFrFS4FRM+3tbuUbDjHXmuBOZJCnhidawRUkL2VCVab X-Received: by 2002:a05:6a21:7803:b0:181:3129:363 with SMTP id be3-20020a056a21780300b0018131290363mr3840107pzc.58.1698851119575; Wed, 01 Nov 2023 08:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698851119; cv=none; d=google.com; s=arc-20160816; b=OW9hf9hUTVEcCu4RQM8AUHfateJ2vsxUsCdp0cZHZrLzUC9ZZyI1w/84yfJ+Q8MsTj U2Ttt8E73zvUhFVFH3mFC9tyzGsnb2BlRVJNtJHoCpAblVz6pf+gPfQiCMmNLQEugGgw FhooUhtAeaNlubvCfYaPL4vD7K4D+wFr0kww2L+nJ426sC/43YYq5/7RJmNiFl3ZRQNj NplcSdqD5oZ/lP59cXUQRQkpYXu81WG69kkrT4zbRA0IBnmqE9zjoM1DTJXQhUNuftUa ow5eJ8if0isqA6qkDHHTy4KSgKYq1MtH/ni6ZfjvCpV9yqfi61Ns+zEW43XUCu3smat6 DeTg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=oK+Wjb7mHbHDEpY3lPfN4UgSthhqszyJ82SXC5wmfTE=; fh=dBMhXJFA9J4pDfXGrZbkhy+Gp1pVbk3H3l2Zx64V9wM=; b=bq+1h2psx+HBorjN7akEY3fwsE65/NeHAhw6ZEJH207AHBENqmVlKIACAFUQLo+8Xc 05UOofDXRsNwnfCDLUP3aYFQzHxTfLROqY86u9EfOQ170/0T6w52lC11QJcigQ0snp1b wFR2fGRFE0toKDa/16RFgiLrt3m575eFKH3n56ko43iqq2jmEfV7lYsRoTnnurtSIEo5 Nm4fdJZtXO3ZgHX2WC2CLq9BWXbvxSSibvmPDmRmjbVYHMGebbuU0WigvkSOgIA8XNrP HxMWWQoA7ZohK75KOh6WILmFzYpotW1nSP8mQtcrJ2dNTlGwIPyTdSuu0YxzLUhcqNxI zK4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KvaMMksA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id y11-20020aa79aeb000000b00690feb23e3esi1778322pfp.17.2023.11.01.08.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 08:05:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KvaMMksA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AD37C804C665; Wed, 1 Nov 2023 08:05:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232375AbjKAPE4 (ORCPT + 35 others); Wed, 1 Nov 2023 11:04:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjKAPEy (ORCPT ); Wed, 1 Nov 2023 11:04:54 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CB63FD; Wed, 1 Nov 2023 08:04:52 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD3C6C433C9; Wed, 1 Nov 2023 15:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698851092; bh=LRyD/0lfmUMCFmo/dgJzLHKPzw63T5YzFSCKWUKxnG8=; h=From:To:Cc:Subject:Date:From; b=KvaMMksAdzFxExkmu1Dqn3zYbKkoPOJh+lZOVEIkn3h4JuWRkhC1hRvLl/B/5yh2M P8ITZ4RP9JPn5Ahpf1QSQljQI44hVsGGEsA2jH2GBWq1gg1BhIvVkFoJOypRNipJtQ mI/ibc4Rhd/eweTmPaQhnSneuXgMc1H+Zw5JwQ4PGNe9H7S8IVgxxSmpd/Zvw7fA9k c9Q2wdz2KWtcfu/J+0EU+/k1JME2pTyRoKDkdg1eDjwlzNeo5MKmjypT7Ll++oLL8a HwUn+h5b2TliQI+Ie0WzUP6MZ/Ca3Xx/uu0dGlr0UwmQwL8ktMovnIs4mbL+pzpc8M hRdQoUtDTwhSA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Ungerer , Jack Brennen , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH 0/7] modpost: fix modpost errors for m68k-uclinux-gcc Date: Thu, 2 Nov 2023 00:03:57 +0900 Message-Id: <20231101150404.754108-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 01 Nov 2023 08:05:09 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781374511602287567 X-GMAIL-MSGID: 1781374511602287567 Greg Ungerer reports building with m68k-uclinux-gcc toolchain is broken: https://lore.kernel.org/linux-kbuild/CAK7LNASQ_W5Yva5a4Xx8E2EYi-tN7x3OHgMFhK+93W+BiX1=9Q@mail.gmail.com/T/#m6ff0364f9ca8483c9f6d162619e5005833d1e887 Usually, we do not need to search for export symbols in the .symtab section, but m68k-uclinux-gcc seems to be an exceptional case. I do not know what makes it different from other toolchains. Also, I do not know there exist other toolchains that work like that. This series extends the symsearch feature in case we need to explicitly search for export symbols. Then, the last patch fixes the issue. This series should be applicable for linux-next. This series is too late for the current merge window, but I'd like to fix the issue somehow by the next merge window. Masahiro Yamada (7): modpost: move sym_name() to modpost.h modpost: add const qualifier to syminfo table modpost: add table_size local variable to symsearch_find_nearest() modpost: introduce a filtering feature to symsearch modpost: prefer global symbols in symsearch_find_nearest() modpost: add symsearch_find_with_name() helper function modpost: look up the correct symbol in check_export_symbol() scripts/mod/modpost.c | 39 ++++---- scripts/mod/modpost.h | 12 +++ scripts/mod/symsearch.c | 205 ++++++++++++++++++++++++++++------------ 3 files changed, 180 insertions(+), 76 deletions(-)