Skip to content

Commit

Permalink
Merge pull request #1079 from julien-thierry/fix-norela-toc
Browse files Browse the repository at this point in the history
create-diff-object: Handle ppc64le toc with only constants
  • Loading branch information
joe-lawrence authored Mar 3, 2020
2 parents 2bf36a9 + fbfc8f9 commit b4d2a4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ static struct rela *toc_rela(const struct rela *rela)
rela->type != R_PPC64_TOC16_LO_DS)
return (struct rela *)rela;

/* Only constants in toc */
if (!rela->sym->sec->rela)
return NULL;

/* Will return NULL for .toc constant entries */
return find_rela_by_offset(rela->sym->sec->rela,
(unsigned int)rela->addend);
Expand Down

0 comments on commit b4d2a4e

Please sign in to comment.