>
> 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.
I have also mentioned in the thread the idea of having an alias to
__ImageBase for __image_base__ so that we can change mingw-w64 to use that
to keep link.exe happy.


On Mon, Aug 14, 2017 at 12:49 PM, Martin Storsjö <[email protected]> wrote:

> On Mon, 14 Aug 2017, Martell Malone wrote:
>
> Hey Martin,
>>
>> I had a discussion with Nick and CC'd kai on getting the binutils patch in
>> tree a week ago.
>> https://sourceware.org/ml/binutils/2017-08/msg00123.html
>> It seems to be moving along.
>>
>
> Oh, I see - ok.
>
> 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?
>
> Does lld need a similar patch as well, or does it already do some similar
> sorting? And what about link.exe?
>
>
> // 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
>
------------------------------------------------------------------------------
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

Reply via email to