Skip to content

Commit e862752

Browse files
authored
Merge pull request #1326 from joe-lawrence/batch-sibling-calls
create-diff-object: batch report unsupported sibling calls
2 parents a45c17f + 75421ca commit e862752

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

kpatch-build/create-diff-object.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3860,6 +3860,7 @@ static void kpatch_no_sibling_calls_ppc64le(struct kpatch_elf *kelf)
38603860
struct symbol *sym;
38613861
unsigned char *insn;
38623862
unsigned int offset;
3863+
int sibling_call_errors = 0;
38633864

38643865
if (kelf->arch != PPC64)
38653866
return;
@@ -3893,10 +3894,15 @@ static void kpatch_no_sibling_calls_ppc64le(struct kpatch_elf *kelf)
38933894
if (!find_rela_by_offset(sym->sec->rela, offset))
38943895
continue;
38953896

3896-
ERROR("Found an unsupported sibling call at %s()+0x%lx. Add __attribute__((optimize(\"-fno-optimize-sibling-calls\"))) to %s() definition.",
3897+
log_normal("Found an unsupported sibling call at %s()+0x%lx. Add __attribute__((optimize(\"-fno-optimize-sibling-calls\"))) to %s() definition.\n",
38973898
sym->name, sym->sym.st_value + offset, sym->name);
3899+
sibling_call_errors++;
38983900
}
38993901
}
3902+
3903+
if (sibling_call_errors)
3904+
ERROR("Found %d unsupported sibling call(s) in the patched code.",
3905+
sibling_call_errors);
39003906
}
39013907

39023908
/* Check which functions have fentry/mcount calls; save this info for later use. */

0 commit comments

Comments
 (0)