linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: peterz@infradead.org, clang-built-linux@googlegroups.com,
	Nathan Chancellor <natechancellor@gmail.com>,
	Fangrui Song <maskray@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] objtool: ignore .L prefixed local symbols
Date: Thu, 13 Feb 2020 16:17:58 -0600	[thread overview]
Message-ID: <20200213221758.i6pchz4gsiy2lsyc@treble> (raw)
In-Reply-To: <20200213184708.205083-1-ndesaulniers@google.com>

On Thu, Feb 13, 2020 at 10:47:08AM -0800, Nick Desaulniers wrote:
> Top of tree LLVM has optimizations related to
> -fno-semantic-interposition to avoid emitting PLT relocations for
> references to symbols located in the same translation unit, where it
> will emit "local symbol" references.
> 
> Clang builds fall back on GNU as for assembling, currently. It appears a
> bug in GNU as introduced around 2.31 is keeping around local labels in
> the symbol table, despite the documentation saying:
> 
> "Local symbols are defined and used within the assembler, but they are
> normally not saved in object files."
> 
> When objtool searches for a symbol at a given offset, it's finding the
> incorrectly kept .L<symbol>$local symbol that should have been discarded
> by the assembler.
> 
> A patch for GNU as has been authored.  For now, objtool should not treat
> local symbols as the expected symbol for a given offset when iterating
> the symbol table.
> 
> commit 644592d32837 ("objtool: Fail the kernel build on fatal errors")
> exposed this issue.

Since I'm going to be dropping 644592d32837 ("objtool: Fail the kernel
build on fatal errors") anyway, I wonder if this patch is still needed?

At least the error will be downgraded to a warning.  And while the
warning could be more user friendly, it still has value because it
reveals a toolchain bug.

-- 
Josh


  parent reply	other threads:[~2020-02-13 22:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 18:47 [PATCH] objtool: ignore .L prefixed local symbols Nick Desaulniers
2020-02-13 19:20 ` Fangrui Song
2020-02-14  6:16   ` Arvind Sankar
2020-02-14 18:05     ` Fangrui Song
2020-02-14 20:42       ` Arvind Sankar
2020-02-14 22:20         ` Fangrui Song
2020-02-15  0:05           ` Arvind Sankar
2020-02-15  0:34             ` Arvind Sankar
2020-02-13 22:17 ` Josh Poimboeuf [this message]
2020-02-13 22:37   ` Fangrui Song
2020-02-13 23:16     ` Josh Poimboeuf
2020-02-13 22:55   ` Nick Desaulniers

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=20200213221758.i6pchz4gsiy2lsyc@treble \
    --to=jpoimboe@redhat.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maskray@google.com \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).