create-diff-object: ensure debug sections don't use dynrelas

Debug sections are intended to refer to the patch module only.  And in
fact, any debug section references to non-included symbols are stripped
in kpatch_include_debug_sections().  So there's no need for
need_dynrela() to even think about it.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This commit is contained in:
Josh Poimboeuf 2022-04-06 13:15:13 -07:00
parent 305ff8a5d8
commit c2e73c2cbc

View File

@ -3037,6 +3037,9 @@ static bool need_dynrela(struct kpatch_elf *kelf, struct lookup_table *table,
{
struct lookup_result symbol;
if (is_debug_section(sec))
return false;
/*
* These references are treated specially by the module loader and
* should never be converted to dynrelas.