Skip to content

Commit

Permalink
Fix wrong relocation conversions
Browse files Browse the repository at this point in the history
Relocations to symbols with index 0 should always be ignored, because
these symbols are always local undefined.

.TOC. symbol should also be ignored, as it is a special symbol on
ppc64le arch.

Signed-off-by: Joao Moreira <jmoreira@suse.de>
  • Loading branch information
Joao Moreira committed Mar 21, 2019
1 parent 5138bee commit 69b89ef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions klp-convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,14 @@ static bool must_convert(struct symbol *sym)
if (sym->sec)
return false;

/* skip symbol with index 0 */
if (!sym->idx)
return false;

/* we should not touch .TOC. on ppc64le */
if (strcmp(sym->name, ".TOC.")==0)
return false;

return (!(is_converted(sym->name) || is_exported(sym->name)));
}

Expand Down

0 comments on commit 69b89ef

Please sign in to comment.