On Thursday, 10 September 2020 at 11:58:51 UTC, kinke wrote:
On Thursday, 10 September 2020 at 11:16:55 UTC, burt wrote:
However, I am getting linker errors, telling me that _tlsend, _tlsstart and __bss_end__ are missing.

Perhaps you happen to use some stale artifacts? These magic symbols aren't used anymore in druntime since LDC v1.21, and not defined by the compiler anymore. You also don't need the dummy main() anymore. The object file containing the undefined references should shed some light on what's still referencing them.

I'm not sure if this was the cause, but I believe I was using old libdruntime-ldc.a and libphobos2-ldc.a files which where downloaded from before v1.21. So that issue is fixed.

However, the app is still crashing when I load it, and there appears to be an issue in Runtime.initialize(), which is called from JNI_OnLoad(), which is defined in arsd.jni. The debugger tells me that it was calling `getStaticTLSRange`, which calls `safeAssert` in the `__foreachbody`, which fails and eventually aborts.

Reply via email to