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: 13442859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B342C4332F for ; Wed, 1 Nov 2023 15:04:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230511AbjKAPEz (ORCPT ); Wed, 1 Nov 2023 11:04:55 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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(-)