[fpc-pascal] How to use external linker on windows i386

Sven Barth pascaldragon at googlemail.com
Fri Jun 7 15:42:17 CEST 2024


Sven Barth <pascaldragon at googlemail.com> schrieb am Do., 6. Juni 2024,
11:16:

> Ondrej Pokorny via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb
> am Do., 6. Juni 2024, 09:30:
>
>> Hello,
>>
>> I am on Windows 64bit, but using the i386 compiler.
>>
>> I have to link a 3rd party OBJ file with {$L 'xyz.obj'}.
>>
>> With the internal linker I get these errors:
>> Error: COMDAT selection mode 0 not supported (section: "0")
>> Error: Failed reading coff file, invalid section index while
>> reading xyz.obj
>> Error: Associative COMDAT section for section ".rdata" not found
>>
>
> Can you provide a small example as a bug report that shows this behavior
> (preferably also with source for the object file) so that we can improve
> the internal linker?
>

Thanks to your privately provided example I was able to solve that (though
it still won't link due to missing symbols, but that is not the linker's
fault and probably also the reason why the external linker fails as well).
I still don't understand why the object file contained a COMDAT field with
an invalid selection of 0, but it seems that other linkers ignore that as
well... 🤷‍♀️

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20240607/d7ab6f66/attachment.htm>


More information about the fpc-pascal mailing list