diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c index 39125c6..5a43dd1 100644 --- a/kpatch-build/lookup.c +++ b/kpatch-build/lookup.c @@ -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;