[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241211183719.fz4av7mfht3ec74a@jpoimboe>
Date: Wed, 11 Dec 2024 10:37:19 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Huacai Chen <chenhuacai@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 02/10] objtool: Handle different entry size of rodata
On Wed, Dec 11, 2024 at 11:11:28AM +0800, Tiezhu Yang wrote:
> unsigned int arch_reloc_size(struct reloc *reloc)
> {
> switch (reloc_type(reloc)) {
> case R_X86_64_32:
> case R_X86_64_PC32:
> case R_X86_64_PLT32:
> return 4;
> default:
> return 8;
> }
Looks good to me, you can add R_X86_64_32S as well.
> For ppc, like this:
>
> unsigned int arch_reloc_size(struct reloc *reloc)
> {
> switch (reloc_type(reloc)) {
> case R_PPC_REL32:
> case R_PPC64_REL32:
> return 4;
> default:
> return 8;
> }
Also:
R_PPC_ADDR32
R_PPC_UADDR32
R_PPC_PLT32
R_PPC_PLTREL32
And the ppc64 counterparts have the same values, so not necessary to add
them.
--
Josh
Powered by blists - more mailing lists