On Mon, 9 Sep 2024, Pali Rohár wrote:

On Monday 09 September 2024 09:40:41 Jacek Caban wrote:
On 7.09.2024 00:00, Pali Rohár wrote:
> So maybe the imp symbol could be included only for gcc/binutils builds?


I think that we don't want to introduce differences like that. Ideally, we
should be able to mix tools with crt builds with another tools (so, for
example, use crt built with GCC with clang+lld and the other way around).

Martin in other email pointed that there are such differences due to
llvm's dlltool is different from binutils's dlltool (usage of short vs
long imports and non-usage of weak symbols). So as I understood, mixing
is currently not possible.

This is not true, it's very much possible to mix tools freely.

In a regular setup with GCC/binutils, you can easily build individual object files with Clang instead of GCC. And you can link with LLD instead of GNU ld by using -fuse-ld=lld. This works, LLD can link against both short and long import libraries just fine, even if short ones is the native (and corner case features like delayloading works differentbly between the two).

The opposite also works, but to a lesser degree; GNU ld does support linking against short import libraries in general, but it fails on handling the weak externals that are used for aliases in our base CRT import libraries.

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to