Skip to content

Commit 14b7425

Browse files
committed
FIX Don't leave GOT entries null when libs are loaded with allowUndefined: true
Resolves #22052
1 parent 3de1b90 commit 14b7425

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/library_dylink.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ var LibraryDylink = {
172172
// correctly.
173173
rtn.required = true;
174174
}
175+
var value = resolveGlobalSymbol(symName, true).sym;
176+
if (!value) {
177+
return rtn;
178+
}
179+
if (typeof value == 'function') {
180+
/** @suppress {checkTypes} */
181+
rtn.value = addFunction(value, value.sig);
182+
} else if (typeof value == 'number') {
183+
rtn.value = value;
184+
}
175185
return rtn;
176186
}
177187
},

0 commit comments

Comments
 (0)