mirror of https://github.com/dynup/kpatch
create-diff-object: Fix out-of-range relocation error message
Showing sec+addend isn't valid, show sym+addend instead. Before: create-diff-object: ERROR: sys.o: kpatch_check_relocations: 2550: out-of-range relocation .rodata.__kpatch_do_sys_uname.str1.1+139 in .rela.text.__kpatch_do_sys_uname After: create-diff-object: ERROR: sys.o: kpatch_check_relocations: 2550: out-of-range relocation .LC7+139 in .rela.text.__kpatch_do_sys_uname Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This commit is contained in:
parent
453fb1b97a
commit
fa5a95cafd
|
@ -2547,7 +2547,7 @@ static void kpatch_check_relocations(struct kpatch_elf *kelf)
|
||||||
if (rela->sym->sec) {
|
if (rela->sym->sec) {
|
||||||
sdata = rela->sym->sec->data;
|
sdata = rela->sym->sec->data;
|
||||||
if (rela->addend > (long)sdata->d_size) {
|
if (rela->addend > (long)sdata->d_size) {
|
||||||
ERROR("out-of-range relocation %s+%lx in %s", rela->sym->sec->name,
|
ERROR("out-of-range relocation %s+%lx in %s", rela->sym->name,
|
||||||
rela->addend, sec->name);
|
rela->addend, sec->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue