[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/25540] New: using the same filename for MAP and DLL fails silent
draymond at foxvalley dot net
[Bug ld/25540] New: using the same filename for MAP and DLL fails silently with file corruption
Thu, 13 Feb 2020 04:33:03 +0000
Bug ID: 25540
Summary: using the same filename for MAP and DLL fails silently
with file corruption
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.
- [Bug ld/25540] New: using the same filename for MAP and DLL fails silently with file corruption,
draymond at foxvalley dot net <=