[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b55b8cb2c52f2c3701c83353586130b8dc237ee2.camel@xry111.site>
Date: Wed, 05 Jun 2024 13:54:24 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>,
Tiezhu Yang <yangtiezhu@...ngson.cn>, Nick Desaulniers
<ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>, Justin Stitt
<justinstitt@...gle.com>, Youling Tang <tangyouling@...inos.cn>, Jinyang He
<hejinyang@...ngson.cn>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
mengqinggang@...ngson.cn, cailulu@...ngson.cn, wanglei@...ngson.cn,
luweining@...ngson.cn, Yujie Liu <yujie.liu@...el.com>, Heng Qi
<hengqi@...ux.alibaba.com>, Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH] loongarch: Only select HAVE_OBJTOOL and allow ORC
unwinder if the inline assembler supports R_LARCH_{32,64}_PCREL
On Tue, 2024-06-04 at 22:43 -0700, Nathan Chancellor wrote:
> On Tue, Jun 04, 2024 at 11:07:41PM +0800, Xi Ruoyao wrote:
> > GAS <= 2.41 does not support generating R_LARCH_{32,64}_PCREL for
> > "label - ." and it generates R_LARCH_{ADD,SUB}{32,64} pairs instead.
> > objtool cannot handle R_LARCH_{ADD,SUB}{32,64} pair in __jump_table
> > (static key implementation) and etc. so it will produce some warnings.
> > This is causing the kernel CI systems to complain everywhere.
> >
> > For GAS we can check if -mthin-add-sub option is available to know if
> > R_LARCH_{32,64}_PCREL are supported.
> >
> > For Clang, we require Clang >= 18 and Clang >= 17 already supports
> > R_LARCH_{32,64}_PCREL, so we can always assume Clang is fine for
> > objtool.
>
> For what it's worth, I have noticed some warnings with clang that I
> don't see with GCC but I only filed an issue on our GitHub and never
> followed up on the mailing list, so sorry about that.
>
> https://github.com/ClangBuiltLinux/linux/issues/2024
>
> Might be tangential to this patch though but I felt it was worth
> mentioning.
The warnings in GCC build is definitely the issue handled by this patch.
But the warnings in Clang build should be a different issue. Can you
attach the kernel/events/core.o file from the Clang build for analysis?
I guess we need to disable more optimization...
I personally hate "pessimizing the code generation just for debugging"
with a passion so I never enabled objtool on LoongArch, thus I didn't
notice the issue.
--
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists