Re: [PATCH v2 3/5] objtool: Add support for annotated jump tables

From: Josh Poimboeuf
Date: Thu Oct 10 2024 - 16:13:28 EST


On Thu, Oct 10, 2024 at 02:28:05PM +0200, Ard Biesheuvel wrote:
> @@ -1394,8 +1396,12 @@ static struct reloc *insn_reloc(struct objtool_file *file, struct instruction *i
> if (!file)
> return NULL;
>
> - reloc = find_reloc_by_dest_range(file->elf, insn->sec,
> - insn->offset, insn->len);
> + do {
> + /* Skip any R_*_NONE relocations */
> + reloc = find_reloc_by_dest_range(file->elf, insn->sec,
> + offset++, len--);
> + } while (len && reloc && reloc_type(reloc) == 0);

s/0/R_NONE/

--
Josh