From: Masami Hiramatsu <mhiramat@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Oberparleiter <oberpar@linux.ibm.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Linux-Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
arnd@arndb.de
Subject: Re: linux-next: build warnings from the build of Linus' tree
Date: Tue, 11 Sep 2018 23:10:12 +0900 [thread overview]
Message-ID: <20180911231012.fdc45840f3d91860daa2e180@kernel.org> (raw)
In-Reply-To: <20180911204925.8b6dbbfd9e48369d931cafa2@kernel.org>
On Tue, 11 Sep 2018 20:49:25 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Mon, 10 Sep 2018 15:27:20 +0200
> Peter Oberparleiter <oberpar@linux.ibm.com> wrote:
>
> > On 08.09.2018 05:57, Masami Hiramatsu wrote:
> > > On Fri, 7 Sep 2018 14:50:59 +0200
> > > Peter Oberparleiter <oberpar@linux.ibm.com> wrote:
> > >
> > >> On 06.09.2018 18:42, Masami Hiramatsu wrote:
> > >>> Peter Oberparleiter <oberpar@linux.ibm.com> wrote:
> > >>>> I've attached a quick fix that should address both problems. I'd
> > >>>> appreciate if this patch could get some testing before I post proper fix
> > >>>> patches.
> > >>>
> > >>> Hmm, I'm still not able to reproduce it on powerpc cross build even with
> > >>> CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y ... So, sorry I couldn't test this patch.
> > >>
> > >> Maybe this is related to the compiler/binutils versions used. I'm using
> > >> Fedora 28's gcc-powerpc64 and binutils-powerpc64 packages:
> > >>
> > >> powerpc64-linux-gnu-gcc (GCC) 7.1.1 20170622 (Red Hat Cross 7.1.1-3)
> > >> GNU ld version 2.29.1-4.fc28
> > >>
> > >> For reference I'm also attaching the config that I used to reproduce the
> > >> problem on kernel v4.18.
> > >>
> > >>>> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
> > >>>> index ae5fdff18406..2ca33277a28b 100644
> > >>>> --- a/arch/arm/kernel/vmlinux.lds.h
> > >>>> +++ b/arch/arm/kernel/vmlinux.lds.h
> > >>>> @@ -48,6 +48,7 @@
> > >>>>
> > >>>> #define ARM_DISCARD \
> > >>>> *(.ARM.exidx.exit.text) \
> > >>>> + *(.ARM.exidx.text.exit) \
> > >>>
> > >>> BTW, why would we need this?
> > >>
> > >> That's necessary to fix one of the two ARM linker failures reported via
> > >> https://lkml.org/lkml/2018/8/24/345
> > >>
> > >>>>> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> > >>>>> kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
> > >>>>> of kernel/trace/trace_clock.o
> > >>
> > >> Section ".ARM.exidx.text.exit" refers to ".text.exit" which was
> > >> discarded. With the change above, the extraneous section
> > >> ".ARM.exidx.text.exit" is also discarded, resolving the linker failure.
> > >
> > > OK, so your patch fixes following issue too?
> > >
> > > https://patchwork.kernel.org/patch/10584685/
> >
> > Yes it does, by discarding the text.exit section unconditionally. I
> > don't think we need to keep any exit-related section introduced by GCOV
> > profiling. It is my understanding that the code contained in such a
> > section is only relevant for user-space profiling, to process profiling
> > data when a program ends.
> >
> > Also discarding .ARM.exidx.text.exit seems to be more consistent to how
> > .ARM.exidx.exit.text is handled.
> >
> > > In that case, we should drop above patch.
> >
> > Yes, I agree.
>
> Hm, with your patch (on linus tree), I still have this error on arm cross build.
>
> CC init/version.o
> AR init/built-in.a
> AR built-in.a
> LD vmlinux.o
> MODPOST vmlinux.o
> `.exit.text' referenced in section `.alt.smp.init' of net/dns_resolver/dns_key.o: defined in discarded section `.exit.text' of net/dns_resolver/dns_key.o
Ah, sorry, this is not from GCOV, but alternatives for SMP.
This should be a different issue.
>
> I attached my config.
>
> Since this comes from section discarding, with my patch (which prevent discarding) this error didn't happen.
So, this is just a side effect. your patch is good when CONFIG_DNS_RESOLVER=n
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2018-09-11 14:10 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-24 3:32 linux-next: build warnings from the build of Linus' tree Stephen Rothwell
2018-08-24 8:20 ` Masami Hiramatsu
2018-08-24 11:47 ` Masami Hiramatsu
2018-08-24 12:42 ` Stephen Rothwell
2018-08-25 1:51 ` Masami Hiramatsu
2018-08-26 8:10 ` Masami Hiramatsu
2018-08-27 21:23 ` Stephen Rothwell
2018-08-28 0:43 ` Masami Hiramatsu
2018-09-06 10:49 ` Peter Oberparleiter
2018-09-06 16:42 ` Masami Hiramatsu
2018-09-07 12:50 ` Peter Oberparleiter
2018-09-08 3:57 ` Masami Hiramatsu
2018-09-10 13:27 ` Peter Oberparleiter
2018-09-11 11:49 ` Masami Hiramatsu
2018-09-11 14:10 ` Masami Hiramatsu [this message]
2018-09-06 22:14 ` Stephen Rothwell
2018-09-07 3:34 ` Stephen Rothwell
2018-10-11 0:48 ` Stephen Rothwell
2018-10-11 7:44 ` Peter Oberparleiter
2018-10-11 9:58 ` Stephen Rothwell
2018-10-11 10:37 ` Greg KH
2018-10-11 11:09 ` Peter Oberparleiter
2018-10-11 13:54 ` Arnd Bergmann
2018-10-11 22:12 ` [GIT PULL] A couple of warning fixes Stephen Rothwell
2018-10-12 10:51 ` Greg KH
2018-08-24 12:46 ` linux-next: build warnings from the build of Linus' tree Arnd Bergmann
2018-08-25 18:53 ` Masami Hiramatsu
2018-08-25 19:53 ` Arnd Bergmann
2018-09-01 9:50 ` Masami Hiramatsu
2018-09-01 12:38 ` [PATCH] ARM: linker script: GCOV kernel may refers data in __exit Masami Hiramatsu
2018-09-11 14:12 ` Masami Hiramatsu
2018-08-29 2:11 ` linux-next: build warnings from the build of Linus' tree Greentime Hu
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=20180911231012.fdc45840f3d91860daa2e180@kernel.org \
--to=mhiramat@kernel.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=oberpar@linux.ibm.com \
--cc=rostedt@goodmis.org \
--cc=sfr@canb.auug.org.au \
/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).