Re: [PATCH v2 03/24] objtool: Handle __sanitize_cov*() tail calls

Josh Poimboeuf
2021-08-20T23:17:56Z

On Thu, Jun 24, 2021 at 11:41:02AM +0200, Peter Zijlstra wrote:
> + if (insn->sec->noinstr &&
> + !strncmp(insn->call_dest->name, "__sanitizer_cov_", 16)) {
> + if (reloc) {
> + reloc->type = R_NONE;
> + elf_write_reloc(file->elf, reloc);
> + }
> +
> + elf_write_insn(file->elf, insn->sec,
> + insn->offset, insn->len,
> + sibling ? arch_ret_insn(insn->len)
> + : arch_nop_insn(insn->len));
> +
> + insn->type = sibling ? INSN_RETURN : INSN_NOP;
> + }

It'd be nice to keep the comment for this case that was in
add_call_destinations().

--
Josh