[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b87173faeef587a2ffaaa6f58d34e0940231067.camel@xry111.site>
Date: Wed, 31 Aug 2022 14:10:09 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Huacai Chen <chenhuacai@...nel.org>,
WANG Xuerui <kernel@...0n.name>
Cc: loongarch@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>,
Youling Tang <tangyouling@...ngson.cn>,
Jinyang He <hejinyang@...ngson.cn>
Subject: Re: [PATCH v7 0/5] LoongArch: Support toolchain with new relocation
types
On Wed, 2022-08-31 at 13:44 +0800, Huacai Chen wrote:
> With this series applied and ARCH_WANT_LD_ORPHAN_WARN enabled, we get
> loongarch64-unknown-linux-gnu-ld: warning: orphan section `.got' from
> `arch/loongarch/kernel/head.o' being placed in section `.got'
> loongarch64-unknown-linux-gnu-ld: warning: orphan section `.got.plt'
> from `arch/loongarch/kernel/head.o' being placed in section `.got.plt'
>
> I think we should add this lines in vmlinux.lds.S
> .got : { *(.got) }
> .got.plt : { *(.got.plt) }
>
> But put them to which patch? Patch 2 or Patch 5?
In patch 2 IMO. Because in patch 2 we already know "-Wa,-mla-global-
with-pcrel" does not prevent the generation of GOT with new toolchain.
If you need a v8 please tell me to send it, but I don't know how to
handle -Woverride-init warnings (IMO the fix for this warning should be
a standalone patch outside of the series).
P. S. The ld warning message seems a little strange because "head.o"
does not contain .got or .got.plt sections... I guess there is a linker
bug causing it outputs the very first input file in the message, instead
of the first input file really containing an orphaned section.
Another P. S.: the use of GOT is actually unneeded in main kernel image
but we don't have something equivalent to "-Wa,-mla-global-with-pcrel"
in the new toolchain. Perhaps we can add this feature to GCC later.
--
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists