[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/31614] New: [2.40 Regression] LD fails to link thin archiv
From: |
timo.kreuzer at reactos dot org |
Subject: |
[Bug binutils/31614] New: [2.40 Regression] LD fails to link thin archive |
Date: |
Sat, 06 Apr 2024 11:53:49 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31614
Bug ID: 31614
Summary: [2.40 Regression] LD fails to link thin archive
Product: binutils
Version: 2.40
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: timo.kreuzer at reactos dot org
Target Milestone: ---
Since version 2.40 LD fails to link (certain?) archives in thin format.
Test case:
1. Create the following file as oldnames.def:
----
LIBRARY msvcrt.dll
EXPORTS
eof==_eof
----
2. Create an import lib with the command "dlltool.exe --def oldnames.def
--output-lib=oldnames.a -t oldnames"
3. Convert the import lib to thin format with the command "ar.exe crT
liboldnames.a oldnames.a"
4. Create the following file as bug.c:
----
extern int eof(int fd);
int main() {
return eof(0);
}
----
5. Compile bug.c with "gcc -o bug.obj -c bug.c"
6. Link bug.exe with "gcc bug.obj liboldnames.a -o bug.exe"
Expected behavior: It links the executable.
Observed behavior (with ld 2.40, 2.41, 2.42): ld fails with an error:
"collect2.exe: error: ld returned 5 exit status"
Using binutils 2.42 and only replacing ld.exe with version 2.39 fixes the
issue.
Please note that the process above is a simple example for an integral part of
the ReactOS build process and suggestions like "just don't convert the import
lib to thin format" are not helpful.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/31614] New: [2.40 Regression] LD fails to link thin archive,
timo.kreuzer at reactos dot org <=