Re: [PATCH v7 0/5] LoongArch: Support toolchain with new relocation types

From: Xi Ruoyao
Date: Tue Sep 06 2022 - 01:01:41 EST


On Tue, 2022-09-06 at 12:43 +0800, Huacai Chen wrote:
> > Note that -fpic/-fPIC is "position-independent code *suitable for
> > use in a shared library*", while -fpie/-fPIE is more like just
> > "position-independent code".  The names of those options are confusing.
> > (When -fpic was invented first time, people mostly believed "PIC had
> > been only for shared libraries", so it's named -fpic instead of -shlib
> > or something.)  IMO in the EFI stub for other ports, -fpie should be
> > used instead of -fpic as well because the EFI stub is not similar to a
> > shared library in any means.

> You are right, but I guess that Ard doesn't want to squash the efistub
> change into the LoongArch efistub support patch. :)

It only changes cflags-$(CONFIG_LOONGARCH), which is LoongArch specific.
And arm64 is also using -fpie.

Should I send the one-line EFI stub change to linux-efi first?

--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University