[PATCH] [ELF] Make -init/-fini options compatible with the gnu linker

Joerg Sonnenberger joerg at NetBSD.org
Tue Dec 9 07:07:21 PST 2014


I don't think we should do anything special for static linking. It's up to the CRT code to handle .init_array / .fini_array in that case. I don't know if crt1.o on Linux does it, but they discourage static linking anyway.

Always using .init_array breaks platforms using traditional SysV .init. It should only be enabled for Linux and ARM EABI (IIRC). You can't convert .init to .init_array.

http://reviews.llvm.org/D6578






More information about the llvm-commits mailing list