mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: objtool warning breaks build for fs/dlm/lock.o
Date: Mon, 18 May 2020 18:04:24 -0500	[thread overview]
Message-ID: <20200518230424.rftemp76uch4piy7@treble> (raw)
In-Reply-To: <20200518225325.is5ojipcc5uq5y5n@treble>

On Mon, May 18, 2020 at 05:53:28PM -0500, Josh Poimboeuf wrote:
> > I'm now struggling with a clang -fintegrated-as related failure:
> > 
> > arch/x86/kernel/ftrace_64.o: warning: objtool: missing symbol for insn at offset 0x16
> > make[4]: *** [/git/arm-soc/scripts/Makefile.build:355:
> > arch/x86/kernel/ftrace_64.o] Error 255
> > 
> > Using this as a local workaround, but I'd like to find out if this is a bug
> > in clang or in objtool:
> 
> It seems like an objtool bug, though at first glance I don't know where
> exactly.  It could be a problem with the rb-tree stuff Peter added
> recently.
> 
> That instruction should be part of the __fentry__ function:
> 
>      4: 0000000000000000   165 FUNC    GLOBAL DEFAULT    3 __fentry__
> 
> So find_symbol_containing() should associate it with __fentry__.

Peter, is find_symbol_containing() broken by aliased functions and/or
overlapping symbols?

Symbol table '.symtab' contains 7 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT    5 __ksym_marker___fentry__
     2: 000000000000000e     0 NOTYPE  LOCAL  DEFAULT    3 fgraph_trace
     3: 000000000000000f     0 NOTYPE  LOCAL  DEFAULT    3 trace
     4: 0000000000000000   165 FUNC    GLOBAL DEFAULT    3 __fentry__
     5: 000000000000000e     0 NOTYPE  GLOBAL DEFAULT    3 ftrace_stub
     6: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND ftrace_trace_function

Notice the NOTYPEs are inside the FUNC.

-- 
Josh


      reply	other threads:[~2020-05-18 23:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 14:07 Arnd Bergmann
2020-05-07 23:29 ` Josh Poimboeuf
2020-05-08  9:27   ` Arnd Bergmann
2020-05-08  9:55     ` Peter Zijlstra
2020-05-08 16:17       ` Josh Poimboeuf
2020-05-08 16:26         ` Peter Zijlstra
2020-05-08 16:29           ` Josh Poimboeuf
2020-05-08  9:45   ` Peter Zijlstra
2020-05-08 16:20     ` Josh Poimboeuf
2020-05-18 19:57   ` Arnd Bergmann
2020-05-18 22:53     ` Josh Poimboeuf
2020-05-18 23:04       ` Josh Poimboeuf [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=20200518230424.rftemp76uch4piy7@treble \
    --to=jpoimboe@redhat.com \
    --cc=arnd@arndb.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®