[ELF] --wrap: don't clear sym->isUsedInRegularObj if real->isUsedInRegularObj;...
[ELF] --wrap: don't clear sym->isUsedInRegularObj if real->isUsedInRegularObj; set wrap's initial binding to sym's Fix PR49897: if `__real_foo` has the isUsedInRegularObj bit set, we need to retain `foo` in .symtab, even if `foo` is undefined. The new behavior will match GNU ld. Before the patch, we produced an R_X86_64_JUMP_SLOT relocation referencing the index 0 undefined symbol, which would be erroed by glibc (see f96ff3c0). While here, fix another bug: if `__wrap_foo` does not exist, its initial binding should be `foo`'s.
Loading
Please sign in to comment