Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

objtool: Check for missing annotation entries in read_annotate()

Add a sanity check to make sure none of the relocations for the
.discard.annotate_insn section have gone missing.

Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

+5
+5
tools/objtool/check.c
··· 2293 2293 sec->sh.sh_entsize = 8; 2294 2294 } 2295 2295 2296 + if (sec_num_entries(sec) != sec_num_entries(sec->rsec)) { 2297 + ERROR("bad .discard.annotate_insn section: missing relocs"); 2298 + return -1; 2299 + } 2300 + 2296 2301 for_each_reloc(sec->rsec, reloc) { 2297 2302 type = *(u32 *)(sec->data->d_buf + (reloc_idx(reloc) * sec->sh.sh_entsize) + 4); 2298 2303 type = bswap_if_needed(file->elf, type);