https://issues.dlang.org/show_bug.cgi?id=23061
Tomoya Tanjo <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #3 from Tomoya Tanjo <[email protected]> --- I close this issue because it is a matter of linker options rather than druntime itself. It only happens when using `gcc` on Alpine Linux. It does not happen when using `clang`. When we use `gcc` as a linker, it needs `-Xlinker --eh-frame-hdr`. ```console $ dmd -c app.d $ gcc app.o -o app -m64 -static -Xlinker --eh-frame-hdr -Xlinker --export-dynamic -L/usr/lib/ -Xlinker -Bstatic -lphobos2 -lpthread -lm -lrt -ldl -lunwind $ echo $? 0 ``` When we use `clang` as a linker, it works without `-Xlinker --eh-frame-hdr` because `clang` implicitly passes them to `ld`. ```console $ dmd -c app.d $ clang app.o -o app -m64 -static -Xlinker --export-dynamic -L/usr/lib/ -Xlinker -Bstatic -lphobos2 -lpthread -lm -lrt -ldl -lunwind $ ./app $ echo $? 0 ``` --
