libdyld: fixed symbol relocation #134

Merged
sb10q merged 1 commits from dyld-fix into master 2021-09-25 13:49:49 +08:00
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ pub fn relocate<R: Relocatable>(
if let Some(addr) = lib.lookup(sym_name) {
// First, try to resolve against itself.
trace!("looked up symbol {} in image", format_sym_name(sym_name));
value = lib.image.ptr() as u32 + addr;
value = addr;
} else if let Some(addr) = resolve(sym_name) {
// Second, call the user-provided function.
trace!("resolved symbol {:?}", format_sym_name(sym_name));