On Fri, 2022-09-02 at 11:12 +0800, Huacai Chen wrote: > On Thu, Sep 1, 2022 at 6:56 PM Xi Ruoyao <xry...@xry111.site> wrote: > > > > We'd like to introduce a new codegen option to align with the old > > "-Wa,-mla-global-with-pcrel" and avoid a performance & size > > regression > > building the Linux kernel with new-reloc toolchain. And it should > > be > > also useful for building statically linked executables, firmwares > > (EDK2 > > for example), and other OS kernels. > > > > OK for trunk? > This seems drop your (1)(2)(3) approach and do a similar thing as "a > new code model" discussed in another thread?
Step (1) is rejected because they've found some issue with copy relocation impossible to be solved (there is a plan to drop copy relocation from other architectures as well). This is a modification of (2): we add -mdirect-extern-access, but without copy relocation it can only be used by kernel, static executable, etc. so it's not the default. In kernel we just use KBUILD_CFLAGS_KERNEL += -mdirect-extern-access. For modules we use GOT until we can get rid of XKPRANGE. -- Xi Ruoyao <xry...@xry111.site> School of Aerospace Science and Technology, Xidian University