mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
Merge tag 'objtool_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull objtool fixes from Borislav Petkov: - Move a warning about a lld.ld breakage into the verbose setting as said breakage has been fixed in the meantime - Teach objtool to ignore dangling jump table entries added by Clang * tag 'objtool_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Move dodgy linker warn to verbose objtool: Ignore dangling jump table entries
This commit is contained in:
@@ -1976,6 +1976,14 @@ static int add_jump_table(struct objtool_file *file, struct instruction *insn,
|
||||
reloc_addend(reloc) == pfunc->offset)
|
||||
break;
|
||||
|
||||
/*
|
||||
* Clang sometimes leaves dangling unused jump table entries
|
||||
* which point to the end of the function. Ignore them.
|
||||
*/
|
||||
if (reloc->sym->sec == pfunc->sec &&
|
||||
reloc_addend(reloc) == pfunc->offset + pfunc->len)
|
||||
goto next;
|
||||
|
||||
dest_insn = find_insn(file, reloc->sym->sec, reloc_addend(reloc));
|
||||
if (!dest_insn)
|
||||
break;
|
||||
@@ -1993,6 +2001,7 @@ static int add_jump_table(struct objtool_file *file, struct instruction *insn,
|
||||
alt->insn = dest_insn;
|
||||
alt->next = insn->alts;
|
||||
insn->alts = alt;
|
||||
next:
|
||||
prev_offset = reloc_offset(reloc);
|
||||
}
|
||||
|
||||
@@ -2265,7 +2274,7 @@ static int read_annotate(struct objtool_file *file,
|
||||
|
||||
if (sec->sh.sh_entsize != 8) {
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
if (!warned && opts.verbose) {
|
||||
WARN("%s: dodgy linker, sh_entsize != 8", sec->name);
|
||||
warned = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user