Re: [PATCH v2 03/24] objtool: Handle __sanitize_cov*() tail calls
From: Peter Zijlstra
Date: Wed Aug 25 2021 - 06:20:47 EST
On Fri, Aug 20, 2021 at 04:17:44PM -0700, Josh Poimboeuf wrote:
> 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().
Done!