[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/30079] New: Mingw ld : linking against an import lib causes ld t
From: |
didier.smets at free dot fr |
Subject: |
[Bug ld/30079] New: Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c |
Date: |
Sat, 04 Feb 2023 15:19:51 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30079
Bug ID: 30079
Summary: Mingw ld : linking against an import lib causes ld to
abort() at compare_section in ldlang.c
Product: binutils
Version: 2.39
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: didier.smets at free dot fr
Target Milestone: ---
Created attachment 14653
--> https://sourceware.org/bugzilla/attachment.cgi?id=14653&action=edit
archive containing the four files needed to reproduce the bug
After an upgrade of my Debian machine (which for binutils means 2.35 -> 2.39),
I have encountered the following issue while building a project. Debian
packager has asked me to report upstream.
I have been able to trace the issue so that it can reproduced in a very simple
test
case (all needed files included as attachments - the datarefs.c is a tiny test
one, the XPLM_64.lib is a third party import lib).
Test:
Untar the attached archive (one C source + one import lib and corresponding two
header files) into a directory of your choice and issue :
/usr/bin/x86_64-w64-mingw32-gcc -shared -o datarefs.dll datarefs.c -L . -l
:XPLM_64.lib
Yields :
/usr/bin/x86_64-w64-mingw32-ld: internal error: aborting at
./upstream/ld/ldlang.c:527 in compare_section
/usr/bin/x86_64-w64-mingw32-ld: please report this bug
collect2: error: ld returned 1 exit status
Notes after testing:
1) It works fine in Debian Bullseye (binutils-mingw 2.35).
2) It works fine in the non mingw build (I mean with .so rather than .dll
output, but of course no import lib is needed in that case).
3) It works fine in mingw binutils 2.39 if in datarefs.c I comment out _all but
one_ (any of them) function.
Exact Debian package causing the issue:
Debian unstable package : binutils-mingw-w64-x86-64 2.39.90.20230110-1+10.3
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/30079] New: Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c,
didier.smets at free dot fr <=
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, reiter.christoph at gmail dot com, 2023/02/07
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, reiter.christoph at gmail dot com, 2023/02/07
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, reiter.christoph at gmail dot com, 2023/02/07
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, matz at suse dot de, 2023/02/07
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, reiter.christoph at gmail dot com, 2023/02/07
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, reiter.christoph at gmail dot com, 2023/02/07
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, reiter.christoph at gmail dot com, 2023/02/12
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, matz at suse dot de, 2023/02/13
- [Bug ld/30079] Mingw ld : linking against an import lib causes ld to abort() at compare_section in ldlang.c, reiter.christoph at gmail dot com, 2023/02/13