I was thinking too long symbol names generated by gdc could cause a memory corruption in the linker. However, I was able to reproduce the exact same symptoms if I try to link the resulting object file with the "gold" linker (instead of ld). Valgrind during the linking step shows nothing interesting.