https://sourceware.org/bugzilla/show_bug.cgi?id=31761
Bug ID: 31761 Summary: Linker deletes output file even if linking fails Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: peter0x44 at disroot dot org Target Milestone: --- For cases of compiler commands like: gcc -o file.c -lm file.c gets deleted, despite that the linking fails (undefined reference to main) gcc -fuse-ld=lld and -fuse-ld=mold don't have this problem, and the "output" remains intact regardless of the mistake in the command. Both BFD and gold will delete file.c in this case. -- You are receiving this mail because: You are on the CC list for the bug.