mirror of
https://github.com/dynup/kpatch
synced 2024-12-12 00:14:35 +00:00
create-diff-object: fix symbol section indexes
For a local non-included function or object which is needed by an included function, its symbol table entry will still refer to a local section index. Instead it should be changed to SHN_UNDEF.
This commit is contained in:
parent
0ebbed244e
commit
b1131bfeb6
@ -982,6 +982,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)
|
||||
sym->sym.st_shndx = SHN_UNDEF;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user