[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7cad6e78014168a8906e130e1cf3809077d2bda7.camel@xry111.site>
Date: Sat, 30 Jul 2022 01:55:29 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Youling Tang <tangyouling@...ngson.cn>, loongarch@...ts.linux.dev
Cc: linux-kernel@...r.kernel.org, WANG Xuerui <kernel@...0n.name>,
Huacai Chen <chenhuacai@...nel.org>,
Jinyang He <hejinyang@...ngson.cn>,
Lulu Cheng <chenglulu@...ngson.cn>
Subject: Re: [PATCH v4 0/4] LoongArch: Support new relocation types
On Fri, 2022-07-29 at 20:19 +0800, Youling Tang wrote:
> On 07/29/2022 07:45 PM, Xi Ruoyao wrote:
> > Hmm... The problem is the "addresses" of per-cpu symbols are faked: they
> > are actually offsets from $r21. So we can't just load such an offset
> > with PCALA addressing.
> >
> > It looks like we'll need to introduce an attribute for GCC to make an
> > variable "must be addressed via GOT", and add the attribute into
> > PER_CPU_ATTRIBUTES.
> Yes, we need a GCC attribute to specify the per-cpu variable.
GCC patch adding "addr_global" attribute for LoongArch:
https://gcc.gnu.org/pipermail/gcc-patches/2022-July/599064.html
An experiment to use it:
https://github.com/xry111/linux/commit/c1d5d70
This fixes "modprobe x_tables" for me.
--
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists