https://sourceware.org/bugzilla/show_bug.cgi?id=25540
Bug ID: 25540 Summary: using the same filename for MAP and DLL fails silently with file corruption Product: binutils Version: 2.30 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: draymond at foxvalley dot net Target Milestone: --- I discovered this due to an error in my Makefile. I was using "-Wl,-Map=$(@:.dll=.map) -o $@" on the command line but the target was foo.pyd (not foo.dll). Therefore I inadvertantly specified the same filename for the map file and the output file. This caused the linker to fail silently (no warnings or errors) and generate a corrupt output file. The section headers pointed to areas in the file that did not contain the expected sections. When doing the same thing using lld it succeeds with a valid output file but no map file is generated. It would be better for ld to detect the duplicate filename and fail with a helpful error message or to mimic the behavior of lld. -- You are receiving this mail because: You are on the CC list for the bug.