- 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 -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmexqKkACgkQEsHwGGHe VUpaaw/+Pl6iTpZMXmL3uygZpgWR2QgBHIKcwFF9RcVpRDQ19PlSfSpmb2PL2jOf aKoAWq7MiVo2+yMguXYUj4vn8c+I0bBEQvlseUsYzVOiW3RBK1y39K1HZxCX6r3T y/kpXix25Bjs323cxS73U5gmoW6Wpqi/gFVBljXrLlugtqgXJhUXWCpVTL8lkzuH jLkc9pGGt7UAnOWBsKy3FQNZVy4lz6KC9nlYc6dSbAE5dmldBujBVtr9R8GfNxhe K7L5kiKk50rQmlYfZ8aS2ExG+W4EzInU5QHVS6DMsyEU5a3PS/WxYLFQOibjbcM7 7b8SccJGyNsZLaseNMk2Eud5FDcdGFNH2/wFd/hpVxq5Mrfh2iyG9ADzqtWMFz/6 xt0cc4C56v3tS+m1ticahjkB5l/DlvqLe/N2EVNR+15lIdxoTfeRZSoJlo/o1liu G/nZxDQssr57vmALal6b5js6XRrHqsCQVAN9Y9k6TMPcFYbq4B7YHyTe4Q12ChIg BRu/FJJFNjiC6c7QvJ7U/QNpDT3OPrI5Bp4BRGt+Yn7aujtnxUIAgI5+caEe+ASQ 8DEeLwzfMqUTVSeiUeAPrjN9ep0qox7051GqCsQflJqZ7FH321lhrps66kfkDKR8 3c6hr2SyzLzRsBNnTSliVV9OJHrQS/0psQwyuvIEN6mEh/EAk0A= =fVLM -----END PGP SIGNATURE----- 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:
commit
592c358ea9
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue