linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Arnd Bergmann <arnd@arndb.de>, Barret Rhoden <brho@google.com>,
	linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH 1/2] initramfs: fix clang build failure
Date: Fri, 4 Dec 2020 16:34:59 -0800	[thread overview]
Message-ID: <20201204163459.7e95c5a1b24cf5c84f779766@linux-foundation.org> (raw)
In-Reply-To: <20201204165742.3815221-1-arnd@kernel.org>

On Fri,  4 Dec 2020 17:57:33 +0100 Arnd Bergmann <arnd@kernel.org> wrote:

> There is only one function in init/initramfs.c that is in the .text
> section, and it is marked __weak. When building with clang-12 and
> the integrated assembler, this leads to a bug with recordmcount:
> 
> ./scripts/recordmcount  "init/initramfs.o"
> Cannot find symbol for section 2: .text.
> init/initramfs.o: failed

That looks like recordmcount is being silly?

> I'm not quite sure what exactly goes wrong, but I notice that this
> function is only ever called from an __init function, and normally
> inlined. Marking it __init as well is clearly correct and it
> leads to recordmcount no longer complaining.

That works, too.

      parent reply	other threads:[~2020-12-05  0:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 16:57 Arnd Bergmann
2020-12-04 16:57 ` [PATCH 2/2] elfcore: fix building with clang Arnd Bergmann
2020-12-05  0:34 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201204163459.7e95c5a1b24cf5c84f779766@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=brho@google.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --subject='Re: [PATCH 1/2] initramfs: fix clang build failure' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).