Re: [PATCH 2/2] LoongArch: Add support for relocating the kernel with RELR relocation
From: Xi Ruoyao
Date: Sat Jul 06 2024 - 06:34:08 EST
On Sat, 2024-07-06 at 18:29 +0800, Huacai Chen wrote:
/* snip */
> > diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> > index ddc042895d01..03b3ef5edd24 100644
> > --- a/arch/loongarch/Kconfig
> > +++ b/arch/loongarch/Kconfig
> > @@ -607,6 +607,7 @@ config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
> >
> > config RELOCATABLE
> > bool "Relocatable kernel"
> > + select ARCH_HAS_RELR
> Why is this selection under RELOCATABLE? I know ARM64 is the same, but
> why?
Because if we just select it in CONFIG_LOONGARCH instead of
CONFIG_RELOCATABLE, the users who have disabled CONFIG_RELOCATABLE will
still see the entry for RELR in their configuration interface. And
they'll ask "hey what's this for? Why my kernel needs relocation?"
--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University