3 ms·
> Clang now defaults to .init_array on Linux. It used to use .ctors if the found GCC installation is older than 4.7.0 Oh man, I've seen that check somewhere..
by floatboth 7y ago
> Clang now defaults to .init_array on Linux. It used to use .ctors if the found GCC installation is older than 4.7.0
Oh man, I've seen that check somewhere..
namely, I've had to port the init-array-or-ctors decision code from clang to LDC, because LDC was just using LLVM defaults, and LLVM defaulted to ctors on FreeBSD/AArch64, which doesn't support ctors, but that was only noticeable with the LLD linker, because bfd and gold were quietly (!) converting ctors to init_array (!!) as a performance optimization (!!!)
ref: https://github.com/ldc-developers/druntime/pull/146#issuecomment-433229535 https://github.com/ldc-developers/druntime/pull/146#issuecom...