[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241127012042.by4g34m4twlfmove@jpoimboe>
Date: Tue, 26 Nov 2024 17:20:42 -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 v4 06/10] objtool: Handle unsorted table offset of rodata
On Tue, Nov 26, 2024 at 09:28:19PM +0800, Tiezhu Yang wrote:
> > + /* Handle the special cases compiled with Clang on LoongArch */
> > + if (file->elf->ehdr.e_machine == EM_LOONGARCH &&
> > + reloc->sym->type == STT_SECTION && reloc != table &&
> > + reloc_offset(reloc) == reloc_offset(table) + rodata_table_size)
> > + break;
>
> I think it can be generic, like this:
>
> /* Check for the end of the table: */
> if (reloc != table && reloc == next_table)
> break;
>
> if (reloc != table &&
> reloc_offset(reloc) == reloc_offset(table) +
> rodata_table_size)
> break;
>
> What do you think?
I'm not sure, this patch is hard to review because it uses
insn->table_size which doesn't get set until the next patch.
Maybe this patch should come after patches 7 & 8, or maybe they should
be squashed?
--
Josh
Powered by blists - more mailing lists