[PATCH] D49700: [LLD] [COFF] Treat .xdata/.pdata$<sym> as implicitly associative to <sym> for MinGW

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 26 15:18:44 PDT 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D49700#1177387, @rnk wrote:

> In https://reviews.llvm.org/D49700#1177324, @mstorsjo wrote:
>
> >
>
>
>
>
> > It's surprising that this didn't work, but I'm not interested enough in the specifics to dive in the binutils source to figure out why it doesn't.
>
> I gave it a try, but I didn't succeed.


That sounds like the usual case with binutils sources...

>> I guess that some form of this patch is what we need to go with then?
> 
> I think we might, because anyone using libstdc++ compiled with gcc on mingw is going to be linking gcc-produced object files. That fourth case that we wanted to rule out might be more important than we think.

Well, it's one of the cases where I'm sure nobody is doing it right now at least; there are a bunch of other incompatibilities that'd block it (lld can't handle gnu import libraries, https://reviews.llvm.org/D38513; ld.bfd provides extra symbols for `__CTORS_*__`, which forces the mingw crt startup files to be different depending on what linker you'll use; some aspects of dll autoimporting of data). All things that we might want to work on unifying at some point, but it's not all done yet. For a pure clang+llvm-dlltool+lld setup, things are pretty ok though.

That said, I'm fine with moving forward with this patch; it makes the gcc compat issue list one item shorter at least. Are there any other issues with it, or other suggestions? Rui maybe wanted more comments?


https://reviews.llvm.org/D49700





More information about the llvm-commits mailing list