On Thu, Oct 10, 2024 at 02:28:04PM +0200, Ard Biesheuvel wrote:
> @@ -2222,7 +2234,6 @@ static void mark_func_jump_tables(struct objtool_file 
> *file,
>                                   struct symbol *func)
>  {
>       struct instruction *insn, *last = NULL;
> -     struct reloc *reloc;
>  
>       func_for_each_insn(file, func, insn) {
>               if (!last)
> @@ -2245,9 +2256,7 @@ static void mark_func_jump_tables(struct objtool_file 
> *file,
>               if (insn->type != INSN_JUMP_DYNAMIC)
>                       continue;
>  
> -             reloc = find_jump_table(file, func, insn);
> -             if (reloc)
> -                     insn->_jump_table = reloc;
> +             find_jump_table(file, func, insn);

Can we detect the annotation here, and if it exists, pivot to a separate
generic implementation which skips all the arch-specific code and hacks?

That way we could keep the "ugly" separate, and also have all arches
supported by default.

-- 
Josh

Reply via email to