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:
Seth Jennings 2014-04-21 17:39:14 -05:00
parent 7cfcce1ed6
commit ab07805166

View File

@ -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);