Re: [RFC][PATCH 04/16] objtool: Annotate identity_mapped()
From: Josh Poimboeuf
Date: Sun Mar 15 2020 - 11:45:41 EST
On Fri, Mar 13, 2020 at 03:34:29PM +0100, Peter Zijlstra wrote:
> This conflicts with:
>
> 7acfe5315312 ("objtool: Improve call destination function detection")
>
> which wasn't in the tree we were working against :/
>
> I've resolved it something like so.
>
> ---
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -406,7 +406,7 @@ static void add_ignores(struct objtool_f
> {
> struct instruction *insn;
> struct section *sec;
> - struct symbol *func;
> + struct symbol *sym;
> struct rela *rela;
>
> sec = find_section_by_name(file->elf, ".rela.discard.func_stack_frame_non_standard");
> @@ -416,12 +416,12 @@ static void add_ignores(struct objtool_f
> list_for_each_entry(rela, &sec->rela_list, list) {
> switch (rela->sym->type) {
> case STT_FUNC:
> - func = rela->sym;
> + sym = rela->sym;
> break;
>
> case STT_SECTION:
> - func = find_func_by_offset(rela->sym->sec, rela->addend);
> - if (!func)
> + sym = find_symbol_by_offset(rela->sym->sec, rela->addend);
> + if (!sym || (sym->type != STT_FUNC || sym->type != STT_NOTYPE))
^^
&&
--
Josh