Skip to content

Commit 119d60d

Browse files
committed
Explain ifunc AArch64 woes a little more thoroughly.
1 parent cce358d commit 119d60d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ccall.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -1492,9 +1492,11 @@ static jl_cgval_t emit_ccall(jl_codectx_t &ctx, jl_value_t **args, size_t nargs)
14921492
#define is_libjulia_func(name) _is_libjulia_func((uintptr_t)&(name), #name)
14931493

14941494
static jl_ptls_t (*ptls_getter)(void);
1495+
// directly accessing the address of an ifunc can cause compile-time linker issues
1496+
// on some configurations (e.g. AArch64 + -Bsymbolic-functions), so we guard the
1497+
// `&jl_get_ptls_states` within this `#ifdef` guard, and use a more roundabout
1498+
// method involving `jl_dlsym()` on Linux platforms instead.
14951499
#ifdef _OS_LINUX_
1496-
// directly accessing the address of an ifunc can cause linker issue on
1497-
// some configurations (e.g. AArch64 + -Bsymbolic-functions).
14981500
jl_dlsym(jl_dlopen(nullptr, 0), "jl_get_ptls_states", (void **)&ptls_getter, 0);
14991501
#else
15001502
ptls_getter = &jl_get_ptls_states;

0 commit comments

Comments
 (0)