On Thu, 3 Aug 2017, Martell Malone wrote:
Hey Martin,
Glad to see you following up on my various LLVM adventures :)
From what I remember the initialization is done in mingw-w64/crt/gccmain.c.
I believe it may be possible to add this code and not make is clang
specific.
Before the iteration loop check in __do_global_ctors
and __do_global_dtors check if nptrs+1 is equal to -1 and if so just bump
the counter and continue.
This would mean that programs linked with LD would have an extra 2 pointers
in the table but it should be fine otherwise.
Not sure how others would feel about this though.
Without having looked closer into this yet, I guess this is kinda what you
attempted in ca451a7a45d4876065edc6755f8aab8095914b04, which later was
reverted in 5981c0281b1f65b8f9b38b13f504f8af3f6ff209? So I guess that
would be a decent starting point, but trying to fix whatever that attempt
broke?
// Martin
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public