On Mon, 14 Aug 2017, Martell Malone wrote:
Can you briefly summarize what change this does and why it's necessary,
since the plain mingw patch as such seems to work already both with
binutils ld and with lld? Is it in order to guarantee that the symbols in
the mingw patch are sorted correctly so that we can be sure that the
markers are set correctly?
Sure, PROVIDE(__CTOR_LIST__ = .); is now used so that if we define
__CTOR_LIST__ in our code the linker doesn't create it.
We could probably do the same for __CTOR_END__ but I don't want to be too
intrusive, will see what Nick says here.
This is so that when linking with ld we do not get extra unneeded markers.
It doesn't work currently with binutils ld because the sorting is different
from what LD and LINK.exe does, we may have discovered a bug here actually
which I raised on the list.
Does lld need a similar patch as well, or does it already do some similar
sorting? And what about link.exe?
No, both link.exe and lld work just fine as is because of the sorting.
So even if/when binutils get this fixed, I guess we can't just switch to
this behaviour, suddenly requiring the absolutely latest binutils, right?
So once this goes in, it needs to be behind some sort of "clang ||
binutils >= verynew" condition?
// 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