[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAT8AVh8PawDsUoStjYMsOq-DLJbW30SpX7hDDJHZNCd9g@mail.gmail.com>
Date: Fri, 20 Mar 2020 00:48:20 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: linux-mips@...r.kernel.org, Paul Burton <paulburton@...nel.org>,
kbuild-all@...ts.01.org,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
"sparclinux@...r.kernel.org, David S . Miller" <davem@...emloft.net>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Al Viro <viro@...iv.linux.org.uk>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Ilie Halip <ilie.halip@...il.com>,
Nathan Chancellor <natechancellor@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Michal Marek <michal.lkml@...kovi.net>,
kbuild test robot <lkp@...el.com>
Subject: Re: [PATCH v2 2/2] kbuild: link lib-y objects to vmlinux forcibly
when CONFIG_MODULES=y
Hi Thomas,
On Thu, Mar 12, 2020 at 5:40 PM Thomas Bogendoerfer
<tsbogend@...ha.franken.de> wrote:
>
> On Thu, Mar 12, 2020 at 03:12:28PM +0900, Masahiro Yamada wrote:
> > I got the following report from 0-day bot.
> > Please advise me how to fix it.
> >
> >
> > I am not sure how multi-platform works in MIPS.
> >
> > The cavium-octeon platform has its own implementation
> > of various functions.
> >
> > So, vmlinux links different library routines
> > depending on whether CONFIG_CAVIUM_OCTEON_SOC, correct?
>
> for cavium memcpy is directly linked in via octeon-memcpy.o, while for
> every other platform it's coming from lib/lib.a(memcpy.o).
>
> What have you changed, that this doesn't work anymore ?
>
> Thomas.
I want to change all objects from lib-y
to be linked to vmlinux (exactly like obj-y )
if CONFIG_MODULES is enabled.
https://patchwork.kernel.org/patch/11432969/
EXPORT_SYMBOL in libraries
must be linked to vmlinux all the time,
even if there is no call-site in vmlinux.
I believe this is a good simplification because
EXPORT_SYMBOL is interface to loadable modules.
As it turned out, lib-y is (ab)used to avoid
multiple definition errors.
The 0-day detected a bug of 32-bit sparc:
https://patchwork.kernel.org/patch/11432969/
And, another is this one.
MIPS relies on that
arch/mips/lib/lib.a is weaker than octeon ones.
So, annotating __weak is a good solution
(thanks Nick!).
If I send a patch, is it acceptable?
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists