Hello Gnu exports.

I ned help figuring out an issue with using
a set of MinGW generated import libraries in a
MSVC program (called 'hsmodem.exe'; "High-sped Modem").
I'm not using MinGW-w64, but TDM-gcc (gcc 10.3.0).
Hopefully they are similar in this regard.

I've built these using MinGW (which hsmodem.exe depends on):
  'liquid.dll.a' and 'liquid32.dll' (2747 exports)
  from the "digital signal processing" library
  at https://github.com/jgaeddert/liquid-dsp

and:
  'libcodec2.dll.a' and 'libcodec2.dll' (588 exports)
  a "low bitrate Digital Speech codec" library
  at https://github.com/drowe67/codec2

Both of the above .DLLs MUST be built with MinGW due
to the heavy use of 'C99 complex' etc.

So now, I'm trying to use the above imp-libs in
a MSVC x86 'link.exe' step. The 'hsmodem.exe' program links
fine, but running it fails with missing 'codec2_bits_per_frame'
etc.

Using 'pedump hsmodem.exe':
...
Imports Table:
  liquid32.dll
  Import Lookup Table RVA:  000C73A4
  TimeDateStamp:            00000000
  ForwarderChain:           00000000
  DLL Name RVA:             000C9188
  Import Address Table RVA: 000AE3E4
  Ordn  Name
     1  agc_crcf_create
     2  agc_crcf_destroy
     3  agc_crcf_execute
    14  agc_crcf_reset
    15  agc_crcf_set_bandwidth
    58  codec2_bits_per_frame
    60  codec2_create
    61  codec2_decode
    72  codec2_destroy
    74  codec2_encode
   104  codec2_samples_per_frame
   ...

  libcodec2.dll
  Import Lookup Table RVA:  000C73A4
  TimeDateStamp:            00000000
  ForwarderChain:           00000000
  DLL Name RVA:             000C91B4
  Import Address Table RVA: 000AE3E4
  Ordn  Name
     1  agc_crcf_create
     2  agc_crcf_destroy
     3  agc_crcf_execute
    14  agc_crcf_reset
    15  agc_crcf_set_bandwidth
    58  codec2_bits_per_frame
    60  codec2_create
    61  codec2_decode
    72  codec2_destroy
    74  codec2_encode
   104  codec2_samples_per_frame
   ...
-------------------

The same names and ordinals! And note,
the 'Import Address Table RVA' is the
same for both .DLLs. How could this happen?

I suspect a bug in either ld.exe or MSVC's
link.exe due to the large number of symbols.

'ld.exe' is: GNU ld (GNU Binutils) 2.36.1
'link.exe' is: 'Version 14.29.30138.0'

Or could there be other issues to watch out for
when using MinGW imp-libs with MSVC like this?

--
--gv


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to