idata allegedly missing (Win32)

Paul Edwards mutazilah@gmail.com
Fri May 2 14:14:44 GMT 2025


On Fri, May 2, 2025 at 4:20 PM Jan Beulich <jbeulich@suse.com> wrote:

> Hmm, after a quick look at that msvcrt.lib: All _present_ archive members
> indeed look to be fine, but there are ones missing. I expect this library
> also wouldn't work with MS'es link.exe (at least older ones; it's been a
> while since I last used any version thereof). In particular, the members
> providing

Hi Jan.

Does the above imply that you believe ld produces Microsoft-compatible
libraries?

I asked someone else (Robert) to do a test of that, and he reports:


Right, link accepts the kernel.lib (renamed kernel.a to kernel.lib in
makek32.w32)  but produces a broken executable (maybe I'm doing
something wrong).

link -map -nologo -fixed:no -nodefaultlib -out:pdptest.exe
p32start.obj pdptest.obj pdpwin32.lib ../src/kernel32.lib

F:\devel\pdos\pdpclib>pdptest.exe

F:\devel\pdos\pdpclib>

ld on the other hand accepts kernel.lib form makek32.vsc and the
executable works

ld -s -o pdptest.exe p32start.obj pdptest.obj pdpwin32.lib ../src/kernel32.lib.

F:\devel\pdos\pdpclib>pdptest.exe
welcome to pdptest
main function is at 003D1234
allocating 10 bytes
m1 is 014D0004
allocating 20 bytes
m2 is 014E0004
stack is around 013FFC84
usage: pdptest [-bb/-tt/-tb/-bt] <infile> <outfile>
default is text to text copy

F:\devel\pdos\pdpclib>

Again, I may be doing something wrong with the ld to link stuff.


I don't believe Robert is doing something wrong. I had a similar
result of a broken executable mixing and matching a very old
and modified ld with very old Visual Studio 2005, which is why
I asked Robert to do a test with modern software.

Thanks. Paul.


More information about the Binutils mailing list