Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,11 +961,8 @@ void kpatch_include_symbol(struct symbol *sym, int recurselevel)
goto out;
sec->rela->include = 1;
inc_printf("section %s is included\n", sec->rela->name);
list_for_each_entry(rela, &sec->rela->relas, list) {
if (rela->sym->include)
continue;
list_for_each_entry(rela, &sec->rela->relas, list)
kpatch_include_symbol(rela->sym, recurselevel+1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this right, does this mean we can remove the "rela->sym->include = 1" lines in kpatch_regenerate_special_section and kpatch_process_special_sections?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My brain is about done for today. I don't think that is right since there could be some symbols in the rela group that are not reachable from a changed function, but are still need for the rela group to resolve.

Just for kicks I did remove the include line from kpatch_regenerate_special_section() and it fail integration. Don't know why. Logs didn't say.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think that makes sense.

}
out:
inc_printf("end include_symbol(%s)\n", sym->name);
return;
Expand Down Expand Up @@ -1002,12 +999,6 @@ int kpatch_include_changed_functions(struct kpatch_elf *kelf)
kpatch_include_symbol(sym, 0);
}

if (sym->status == NEW &&
sym->type == STT_FUNC) {
log_normal("new function: %s\n", sym->name);
kpatch_include_symbol(sym, 0);
}

if (sym->type == STT_FILE)
sym->include = 1;
}
Expand Down