-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Description
Description / Steps to reproduce the issue
Using llvm-ar to create a thin archive from other archives result in invalid files where nm returns empty content and trying to link using the thin archive fails with ld.lld: error: unknown file type
Steps to repro:
dep.c:
int forty_two() {
return 42;
}Then running:
cc -c dep.c && \
nm -g dep.o && \
ar cr dep.a dep.o && \
nm -g dep.a && \
ar crT archive.a dep.a && \
nm -g archive.a && \
file archive.a
GNU binutils doesn't have this error.
Expected behavior
forty_two
forty_two
forty_two
archive.a: thin archive with 1 symbol entry
Actual behavior
forty_two
forty_two
<nothing is shown here, the output of nm is empty>
archive.a: thin archive with 1684369454 symbol entries
Verification
- I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
Windows Version
MINGW64_NT-10.0-26200
MINGW environments affected
- MINGW64
- MINGW32
- UCRT64
- CLANG64
- CLANGARM64
Are you willing to submit a PR?
No response