Re: [PATCH] objtool: Provide origin hint for elf_init_reloc_text_sym() errors

2024-05-06 Thread Kees Cook
On Sat, May 04, 2024 at 03:24:02PM -0700, Josh Poimboeuf wrote: > On Tue, Apr 30, 2024 at 04:51:07PM -0700, Kees Cook wrote: > > @@ -891,8 +892,8 @@ struct reloc *elf_init_reloc_text_sym(struct elf *elf, > > struct section *sec, > > int addend = insn_off; > > > > if

Re: [PATCH] objtool: Provide origin hint for elf_init_reloc_text_sym() errors

2024-05-04 Thread Josh Poimboeuf
On Tue, Apr 30, 2024 at 04:51:07PM -0700, Kees Cook wrote: > @@ -891,8 +892,8 @@ struct reloc *elf_init_reloc_text_sym(struct elf *elf, > struct section *sec, > int addend = insn_off; > > if (!(insn_sec->sh.sh_flags & SHF_EXECINSTR)) { > - WARN("bad call to %s() for data

[PATCH] objtool: Provide origin hint for elf_init_reloc_text_sym() errors

2024-04-30 Thread Kees Cook
An error report from elf_init_reloc_text_sym() doesn't say what list of symbols it is working on. Include this on the caller's side so it can be reported when pathological conditions are encountered. Signed-off-by: Kees Cook --- I added this to confirm debugging of