linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: libelf-0.175 breaks objtool
Date: Tue, 7 Apr 2020 20:44:11 +0200	[thread overview]
Message-ID: <CAK8P3a3piAV7BbgH-y_zqj4XmLcBQqKZ-NHPcqo4OTF=4H3UFA@mail.gmail.com> (raw)
In-Reply-To: <20200407163253.mji2z465ixaotnkh@treble>

On Tue, Apr 7, 2020 at 6:33 PM Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> On Tue, Apr 07, 2020 at 05:46:23PM +0200, Arnd Bergmann wrote:
> > On Tue, Apr 7, 2020 at 12:31 AM Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Tue, Apr 7, 2020 at 12:16 AM Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > >
> > > It's also odd that I only see the problem in two specific files:
> > > arch/x86/realmode/rm/trampoline_64.o (in half of the randconfig builds)
> > > and fs/xfs/xfs_trace.o  (in only one configuration so far).
> > >
> > > With this patch I can avoid the first one, which is unconditionally
> > > built with -g (why?):
> > >
> > > --- a/arch/x86/realmode/rm/Makefile
> > > +++ b/arch/x86/realmode/rm/Makefile
> > > @@ -69,7 +69,7 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
> > >  # ---------------------------------------------------------------------------
> > >
> > >  KBUILD_CFLAGS  := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \
> > > -                  -I$(srctree)/arch/x86/boot
> > > +                  -I$(srctree)/arch/x86/boot -gz=none
> > >  KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
> > >  KBUILD_CFLAGS  += -fno-asynchronous-unwind-tables
> > >  GCOV_PROFILE := n
> > >
> > > I'll look at the other one tomorrow.
> >
> > I found where -g gets added in both cases, and adding -gz=none
> > seems to address all randconfigs with CONFIG_DEBUG_INFO=n:
> >
> > --- a/fs/xfs/Makefile
> > +++ b/fs/xfs/Makefile
> > @@ -7,7 +7,7 @@
> >  ccflags-y += -I $(srctree)/$(src)              # needed for trace events
> >  ccflags-y += -I $(srctree)/$(src)/libxfs
> >
> > -ccflags-$(CONFIG_XFS_DEBUG) += -g
> > +ccflags-$(CONFIG_XFS_DEBUG) += -g $(call cc-option,-gz=none)
>
> Maybe they shouldn't have -g in the first place?

That is very possible. The -g has been there since xfs was originally merged
back in 2002, and I could not figure out why it was there (unlike the
-DSTATIC=""
and -DDEBUG flags that are set in the same line).

On the other hand, my feeling is that setting -g should not cause problems
with objtool, if CONFIG_DEBUG_INFO is ok.

       Arnd

  reply	other threads:[~2020-04-07 18:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 18:38 libelf-0.175 breaks objtool Steven Rostedt
2019-02-06  2:16 ` Josh Poimboeuf
2019-02-06 17:16   ` Steven Rostedt
2020-04-06 21:07     ` Arnd Bergmann
2020-04-06 22:16       ` Josh Poimboeuf
2020-04-06 22:31         ` Arnd Bergmann
2020-04-07 15:46           ` Arnd Bergmann
2020-04-07 16:32             ` Josh Poimboeuf
2020-04-07 18:44               ` Arnd Bergmann [this message]
2020-04-07 19:30                 ` Arnd Bergmann
2020-04-09  7:41                 ` Christoph Hellwig
2020-04-09  8:25                   ` Arnd Bergmann
2020-04-10  0:46                     ` Dave Chinner

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='CAK8P3a3piAV7BbgH-y_zqj4XmLcBQqKZ-NHPcqo4OTF=4H3UFA@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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).