[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0d491d44407051993e5b68b6f9ef67d4060db6c4.camel@xry111.site>
Date: Wed, 09 Aug 2023 19:58:20 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Peter Zijlstra <peterz@...radead.org>,
Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org, loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v1 5/6] objtool: Add skipped member in struct reloc
On Wed, 2023-08-09 at 19:51 +0800, Xi Ruoyao wrote:
> On Thu, 2023-08-03 at 14:11 +0200, Peter Zijlstra wrote:
> > On Thu, Aug 03, 2023 at 07:36:24PM +0800, Tiezhu Yang wrote:
> >
> > > > ".long " __stringify_label(c) "b - .\n\t" \
> >
> > > I discussed offline with the engineers who are familiar with gnu
> > > assembler of LoongArch, maybe it can modify the gnu assembler
> > > to use R_LARCH_32_PCREL to replace a pair of R_LARCH_ADD32 and
> > > R_LARCH_SUB32, then I will test it again and drop this change if
> > > possible.
>
> Hmm, but I don't like the idea to disallow users having GAS <= 2.41 from
> using ORC unwinder.
>
> Can we emit the R_LARCH_32_PCREL reloc with an explicit .reloc
> directive?
Answering myself: "maybe", I've written a simple PoC:
$ cat t.s
.global main
main:
la.pcrel $t0, f
ld.w $t1, $t0, 0
ldx.d $a0, $t1, $t0
jr $ra
t:
.dword 42
.zero 64
f:
.reloc f, R_LARCH_32_PCREL, t
.word 0
$ ./a.out
$ echo $?
42
--
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists