mirror of https://github.com/dynup/kpatch
kpatch-elf: ensure SHN_LIVEPATCH syms don't get set to SHN_UNDEF when reindexing elements
This commit is contained in:
parent
2c3c44fec2
commit
91909e9273
|
@ -686,7 +686,8 @@ void kpatch_reindex_elements(struct kpatch_elf *kelf)
|
|||
sym->index = index++;
|
||||
if (sym->sec)
|
||||
sym->sym.st_shndx = sym->sec->index;
|
||||
else if (sym->sym.st_shndx != SHN_ABS)
|
||||
else if (sym->sym.st_shndx != SHN_ABS &&
|
||||
sym->sym.st_shndx != SHN_LIVEPATCH)
|
||||
sym->sym.st_shndx = SHN_UNDEF;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue