COFF_TYPE on x86_64

Jeremy Drake gmp at jdrake.com
Mon Nov 2 04:56:52 UTC 2020


On Mon, 2 Nov 2020, Marco Bodrato wrote:

> Ciao Jeremy,
>
> Il 2020-10-02 20:45 Jeremy Drake ha scritto:
> > Looking at the ld code, it only generated the thunk in the import library
> > if it thought the symbol was a function.  Checking the output of gcc -S
> > showed that it added ".def func; .scl 2; .type 32; .endef" to functions,
> > and inserting that into the assembly functions caused ld to generate the
> > thunks, which solved the crash.  When I started to investigate how to
> > integrate generating that in the GMP build system, I came across existing
> > code that did exactly that, but only on 32-bit x86 not x86_64.  The patch
> > I sent copied the necessary parts of that to the x86_64 path.
>
> Can you test if the latest available snapshot is working in your environment?

Yes, I have confirmed that the snapshot generates a correct import lib.
Thank you.

> Do you know if this might be needed also for mingw running on ARM cpus?

Disclaimer: I have no personal experience with mingw or Windows on ARM.
However, after looking through binutils code, and looking at -S output
from clang targeting both armv7 and aarch64 mingw, it appears to me that
it would be needed on ARM as well.


More information about the gmp-bugs mailing list