Re: [PATCH v2] livepatch: create-diff-object: Check that the section has a secsym

2022-07-25 Thread Jan Beulich
On 25.07.2022 05:20, Sarah Newman wrote:
> A STT_SECTION symbol is not needed if if it is not used as a relocation
> target. Therefore, a section, in this case a debug section, may not have
> a secsym associated with it.
> 
> Origin: https://github.com/dynup/kpatch.git ba3defa06073
> Signed-off-by: Sarah Newman 
> ---
> Changes in v2:
> - commit message changed to use Origin

With this I don't see why you didn't keep Ross'es R-b. Please help
committers by keeping tags up-to-date.

Jan



[PATCH v2] livepatch: create-diff-object: Check that the section has a secsym

2022-07-24 Thread Sarah Newman
A STT_SECTION symbol is not needed if if it is not used as a relocation
target. Therefore, a section, in this case a debug section, may not have
a secsym associated with it.

Origin: https://github.com/dynup/kpatch.git ba3defa06073
Signed-off-by: Sarah Newman 
---
Changes in v2:
- commit message changed to use Origin
---
 create-diff-object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/create-diff-object.c b/create-diff-object.c
index a516670..780e6c8 100644
--- a/create-diff-object.c
+++ b/create-diff-object.c
@@ -1484,7 +1484,7 @@ static void kpatch_include_debug_sections(struct 
kpatch_elf *kelf)
list_for_each_entry(sec, >sections, list) {
if (is_debug_section(sec)) {
sec->include = 1;
-   if (!is_rela_section(sec))
+   if (!is_rela_section(sec) && sec->secsym)
sec->secsym->include = 1;
}
}
-- 
2.17.1