mirror of
https://github.com/dynup/kpatch
synced 2024-12-23 21:52:07 +00:00
add info to expected rela sym error
While debugging the code for the bug table logic, I found it useful to know which rela section and entry the error occurred on. Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
parent
7cfcce1ed6
commit
ab07805166
@ -1045,7 +1045,8 @@ void kpatch_create_rela_section(struct section *sec, int link)
|
|||||||
/* reindex and copy into buffer */
|
/* reindex and copy into buffer */
|
||||||
for_each_rela(i, rela, &sec->relas) {
|
for_each_rela(i, rela, &sec->relas) {
|
||||||
if (!rela->sym || !rela->sym->twino)
|
if (!rela->sym || !rela->sym->twino)
|
||||||
ERROR("expected rela symbol");
|
ERROR("expected rela symbol in rela section %s entry %d",
|
||||||
|
sec->name, i);
|
||||||
symndx = rela->sym->twino->index;
|
symndx = rela->sym->twino->index;
|
||||||
type = GELF_R_TYPE(rela->rela.r_info);
|
type = GELF_R_TYPE(rela->rela.r_info);
|
||||||
rela->rela.r_info = GELF_R_INFO(symndx, type);
|
rela->rela.r_info = GELF_R_INFO(symndx, type);
|
||||||
|
Loading…
Reference in New Issue
Block a user