Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1145014pxb; Wed, 10 Feb 2021 00:48:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQZJ4U9DJdUWGA79B7neN7ekJLWZod94JMQtsXg20qAKvA3pYXBgkUMM8FW52ADMNGjVnH X-Received: by 2002:a17:906:12d2:: with SMTP id l18mr1893942ejb.308.1612946938406; Wed, 10 Feb 2021 00:48:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612946938; cv=none; d=google.com; s=arc-20160816; b=T2zy/4zjkbFUeoqs/qKD9p3a+0rPSWVTzhP3sRhTQrkGCVBUWeEioq0JVa0HCNaX+4 PrNgMz+LEv5l8lPBtHm/7W63MRCw7zTeTlCNTZy5nJuktd0GaJAHpJWYbUzxOExIg5ke pUluOidyuExVagWVy7z+ARAA8RPi8z2tklvS1Z8mdmJcsK5IaLMuq9ru8IUyfygeFrzh iJWVClgnJ/clFP0/ST/6XM2q/D+CDJqgkSfApVRElIYK3uv6AEB7Z8dId6GtfFV2eyFz PpN0upeFD8YqINRBQEYogHGefRmN+CSSp4luqe6+t6pywstVhIHL5Wmy3cXTVfqb2ipI kwvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=3DX8/02wQ6Cpgi5cMSc+g0gcdAe8jyFLRruNtzqSL8I=; b=FUHiP+L/kPhxJ1fsRlB5E7L/hVLMdzsRbrsLYXPfU5+3qHzZ8wPJF/vPh9hl2VSPwX PGN6LpKxTItvPojOgs7A12UoqRfWTNS/VZLmmq8HCjeXO1GCL+P1o9KvlRXHoxZOsuqg e1NMKubbdnW6QdK5A7edDr3DFqeF1JwbRvjc4T3w020Rc9WEpDcxjmjRjU/P6WJWYEDY HmKBAt7IhwRtEpRoK5I/hR2sBiNKcn6wJFYisQUILBZy2ROUH/lSLDtdp+B5v5gx+1d0 TYf2+V4guzz6eyg4cFHDtnmouBxX4ljiIy+5iG3wvXbYWaTAzTrI9YST4T72jpg5vzBE N0FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Fa0JrmPq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si962476edx.54.2021.02.10.00.48.35; Wed, 10 Feb 2021 00:48:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Fa0JrmPq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230390AbhBJIoZ (ORCPT + 99 others); Wed, 10 Feb 2021 03:44:25 -0500 Received: from conssluserg-03.nifty.com ([210.131.2.82]:40408 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbhBJIjx (ORCPT ); Wed, 10 Feb 2021 03:39:53 -0500 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 11A8cOpL014811; Wed, 10 Feb 2021 17:38:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 11A8cOpL014811 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1612946305; bh=3DX8/02wQ6Cpgi5cMSc+g0gcdAe8jyFLRruNtzqSL8I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Fa0JrmPqdyIUA3NnzAbZE+CwnixA7nu/ms2u+YPZignsSyacJgm3b07m7/gYny+ff FSxg8rW3UdvfHuJAkUEZmkkMjGTT79Q3liiqvOcYRNDMZ1NKPydgZ17eUlkVGUL4RV rS2jIxJ7+c7MQ6jeVJM9Js2idV7v/WRqRs0/J6wefkecv11TtquPmmzRkkgC68E9uv 1nmibWQju9+tgf70HFqLpN6NQEKLU208AJ0IMTaVzgP9uR9nJKSqR4HM/m5NdpUTmo BiMZWsbUTz8BoEGHBJPDrLjtcG9RZUVLmwkN+vm87PDDabGpTsDl24REm3SIQ+QomE dBRLmSFJd8cVA== X-Nifty-SrcIP: [209.85.216.51] Received: by mail-pj1-f51.google.com with SMTP id e9so746054pjj.0; Wed, 10 Feb 2021 00:38:24 -0800 (PST) X-Gm-Message-State: AOAM533Z6oMinG/oEH/HFO0aeBir9bmENTZk8oepPvaJ6cSuXxMZr35S 20Id83a8v8T4MHm4xmX8aTxwDO93fABc6Hz7gXY= X-Received: by 2002:a17:90a:5403:: with SMTP id z3mr2176385pjh.198.1612946304251; Wed, 10 Feb 2021 00:38:24 -0800 (PST) MIME-Version: 1.0 References: <20210209210843.3af66662@canb.auug.org.au> <20210210085051.7fb951d1@canb.auug.org.au> In-Reply-To: From: Masahiro Yamada Date: Wed, 10 Feb 2021 17:37:47 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: linux-next: build failure after merge of the modules tree To: Jessica Yu Cc: Stephen Rothwell , Christoph Hellwig , Linux Kernel Mailing List , Linux Next Mailing List , Michael Ellerman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 5:06 PM Jessica Yu wrote: > > +++ Stephen Rothwell [10/02/21 08:50 +1100]: > >Hi Jessica, > > > >On Tue, 9 Feb 2021 16:16:20 +0100 Jessica Yu wrote: > >> > >> Hmm, these errors don't look like it's related to that particular commit. I was > > > >I found this commit by bisection and then tested by reverting it. > > > >Before this commit, CONFIG_TRIM_UNUSED_KSYMS would not be set in the > >allyesconfig build because CONFIG_UNUSED_SYMBOLS was set. After this > >commit, CONFIG_TRIM_UNUSED_KSYMS will be set in the allyesconfig build. > > Ah, that makes sense then. I would get the error on powerpc whenever > CONFIG_TRIM_UNUSED_KSYMS was enabled. > > >> able to reproduce these weird autoksym errors even without any modules-next > >> patches applied, and on a clean v5.11-rc7 tree. To reproduce it, > >> CONFIG_TRIM_UNUSED_KSYMS needs to be enabled. I guess that's why we run into > >> these errors with allyesconfig. I used a gcc-7 ppc64le cross compiler and got > >> the same compiler warnings. It seems to not compile on powerpc properly because > >> it looks like some symbols have an extra dot "." prefix, for example in > >> kthread.o: > >> > >> 168: 0000000000000318 24 NOTYPE GLOBAL DEFAULT 6 kthread_create_worker > >> 169: 0000000000001d90 104 FUNC GLOBAL DEFAULT 1 .kthread_create_worker > >> 170: 0000000000000330 24 NOTYPE GLOBAL DEFAULT 6 kthread_create_worker_on_cpu > >> 171: 0000000000001e00 88 FUNC GLOBAL DEFAULT 1 .kthread_create_worker_on_cpu > >> 172: 0000000000000348 24 NOTYPE GLOBAL DEFAULT 6 kthread_queue_work > >> 173: 0000000000001e60 228 FUNC GLOBAL DEFAULT 1 .kthread_queue_work > >> > >> So I suppose this dot prefix is specific to powerpc. From the ppc64 elf abi docs: > >> > >> Symbol names with a dot (.) prefix are reserved for holding entry point > >> addresses. The value of a symbol named ".FN", if it exists, is the entry point > >> of the function "FN". > >> > >> I guess the presence of the extra dot symbols is confusing > >> scripts/gen_autoksyms.sh, so we get the dot symbols in autoksyms.h, which the > >> preprocessor doesn't like. I am wondering how this was never caught until now > >> and also now curious if this feature was ever functional on powerpc.. > > > >Which feature? > > Sorry, by "feature" I meant CONFIG_TRIM_UNUSED_KSYMS. This config > option was introduced around v4.7. If simply enabling it produces > these compilation errors I was wondering if it ever built properly on > powerpc. > > Thanks, > > Jessica Thanks for the report. I think the following will fix the issue, but modpost needs fixing too. diff --git a/scripts/gen_autoksyms.sh b/scripts/gen_autoksyms.sh index 16c0b2ddaa4c..996a7109167b 100755 --- a/scripts/gen_autoksyms.sh +++ b/scripts/gen_autoksyms.sh @@ -44,7 +44,7 @@ sed 's/ko$/mod/' $modlist | xargs -n1 sed -n -e '2{s/ /\n/g;/^$/!p;}' -- | cat - "$ksym_wl" | sort -u | -sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$output_file" +sed -e 's/^\.\{,1\}\(.*\)/#define __KSYM_\1 1/' >> "$output_file" # Special case for modversions (see modpost.c) if [ -n "$CONFIG_MODVERSIONS" ]; then m I will post two patches with some commit log after some testing. (one for gen_autoksyms.sh and the other for modpost). -- Best Regards Masahiro Yamada