mirror of
https://github.com/dynup/kpatch
synced 2025-01-25 22:32:43 +00:00
Merge pull request #508 from libin2015/support-weak-function-v2
kpatch-build: support patching weak function
This commit is contained in:
commit
8a182ce0aa
@ -185,7 +185,7 @@ int lookup_global_symbol(struct lookup_table *table, char *name,
|
||||
|
||||
memset(result, 0, sizeof(*result));
|
||||
for_each_symbol(i, sym, table)
|
||||
if (!sym->skip && sym->bind == STB_GLOBAL &&
|
||||
if (!sym->skip && (sym->bind == STB_GLOBAL || sym->bind == STB_WEAK) &&
|
||||
!strcmp(sym->name, name)) {
|
||||
result->value = sym->value;
|
||||
result->size = sym->size;
|
||||
|
Loading…
Reference in New Issue
Block a user