[PATCH] D35509: Covnert .[cd]tors to .{init, fini}_array using synthetic section.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 00:56:22 PDT 2017


grimar added inline comments.


================
Comment at: lld/ELF/Writer.cpp:140
+template <class ELFT> static void convertCtorsDtorsToInitFini() {
+  for (InputSectionBase *&S : InputSections)
+    if (InputSection *IS = dyn_cast<InputSection>(S))
----------------
emaste wrote:
> rafael wrote:
> > We have to check if all systems support .init_array. Ed, can you confirm?
> FreeBSD support was added in [[ https://reviews.freebsd.org/rS232831 | r232831 ]] in March 2012.
> 
> NetBSD has support, although I don't know if there are platform-specific differences. I'm not sure about OpenBSD; I see patches were posted last year but I do not know if they were merged in. Perhaps @joerg and @kettenis can add more info?
> 
> 
Should we show warning when have .ctors/.dtors ?


https://reviews.llvm.org/D35509





More information about the llvm-commits mailing list