Skip to content

Commit 67f29d8

Browse files
authored
[CLI] error on not finding symbol (JuliaLang#38994)
Also removes some excess exports that are not in julia.h, including intrinsics and the unused `jl_cpuid` function (only defined on Intel processors).
1 parent fbffe7c commit 67f29d8

File tree

3 files changed

+11
-222
lines changed

3 files changed

+11
-222
lines changed

cli/loader_lib.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,12 @@ __attribute__((constructor)) void jl_load_libjulia_internal(void) {
160160

161161
// Once we have libjulia-internal loaded, re-export its symbols:
162162
for (unsigned int symbol_idx=0; jl_exported_func_names[symbol_idx] != NULL; ++symbol_idx) {
163-
(*jl_exported_func_addrs[symbol_idx]) = lookup_symbol(libjulia_internal, jl_exported_func_names[symbol_idx]);
163+
void *addr = lookup_symbol(libjulia_internal, jl_exported_func_names[symbol_idx]);
164+
if (addr == NULL) {
165+
jl_loader_print_stderr3("ERROR: Unable to load ", jl_exported_func_names[symbol_idx], " from libjulia-internal");
166+
exit(1);
167+
}
168+
(*jl_exported_func_addrs[symbol_idx]) = addr;
164169
}
165170
}
166171

0 commit comments

Comments
 (0)