Merge pull request #508 from libin2015/support-weak-function-v2

kpatch-build: support patching weak function
This commit is contained in:
Seth Jennings 2015-10-16 08:52:03 -05:00
commit 8a182ce0aa

View File

@ -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;