[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H4Db0tVrqcfXHceJeODgnK0ggHpx9_6vwXAAV0LohCD-w@mail.gmail.com>
Date: Sat, 7 Dec 2024 17:21:00 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Huacai Chen <chenhuacai@...ngson.cn>, Sasha Levin <sashal@...nel.org>,
Xuerui Wang <kernel@...0n.name>, Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>,
Nicolas Schier <nicolas@...sle.eu>, stable@...r.kernel.org, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org, loongarch@...ts.linux.dev,
Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [PATCH 6.1&6.6 0/3] kbuild: Avoid weak external linkage where possible
Hi, Greg,
On Fri, Dec 6, 2024 at 9:04 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> On Fri, Dec 06, 2024 at 04:58:07PM +0800, Huacai Chen wrote:
> > Backport this series to 6.1&6.6 because LoongArch gets build errors with
> > latest binutils which has commit 599df6e2db17d1c4 ("ld, LoongArch: print
> > error about linking without -fPIC or -fPIE flag in more detail").
> >
> > CC .vmlinux.export.o
> > UPD include/generated/utsversion.h
> > CC init/version-timestamp.o
> > LD .tmp_vmlinux.kallsyms1
> > loongarch64-unknown-linux-gnu-ld: kernel/kallsyms.o:(.text+0): relocation R_LARCH_PCALA_HI20 against `kallsyms_markers` can not be used when making a PIE object; recompile with -fPIE
> > loongarch64-unknown-linux-gnu-ld: kernel/crash_core.o:(.init.text+0x984): relocation R_LARCH_PCALA_HI20 against `kallsyms_names` can not be used when making a PIE object; recompile with -fPIE
> > loongarch64-unknown-linux-gnu-ld: kernel/bpf/btf.o:(.text+0xcc7c): relocation R_LARCH_PCALA_HI20 against `__start_BTF` can not be used when making a PIE object; recompile with -fPIE
> > loongarch64-unknown-linux-gnu-ld: BFD (GNU Binutils) 2.43.50.20241126 assertion fail ../../bfd/elfnn-loongarch.c:2673
> >
> > In theory 5.10&5.15 also need this, but since LoongArch get upstream at
> > 5.19, so I just ignore them because there is no error report about other
> > archs now.
>
> Odd, why doesn't this affect other arches as well using new binutils? I
> hate to have to backport all of this just for one arch, as that feels
> odd.
The related binutils commit is only for LoongArch, so build errors
only occured on LoongArch. I don't know why other archs have no
problem exactly, but may be related to their CFLAGS (for example, if
we disable CONFIG_RELOCATABLE, LoongArch also has no build errors
because CFLAGS changes).
On the other hand, Ard's original patches are not for LoongArch only,
so I think backport to stable branches is also not for LoongArch only.
Huacai
>
> thanks,
>
> greg k-h
Powered by blists - more mailing lists