Skip to content

Commit c2e73c2

Browse files
committed
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>
1 parent 305ff8a commit c2e73c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kpatch-build/create-diff-object.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3037,6 +3037,9 @@ static bool need_dynrela(struct kpatch_elf *kelf, struct lookup_table *table,
30373037
{
30383038
struct lookup_result symbol;
30393039

3040+
if (is_debug_section(sec))
3041+
return false;
3042+
30403043
/*
30413044
* These references are treated specially by the module loader and
30423045
* should never be converted to dynrelas.

0 commit comments

Comments
 (0)