Commit Graph

4 Commits

Author SHA1 Message Date
George Rimar 548adcdec4 [COFF] - Fixed format in writeOutSecLine()
The same as https://reviews.llvm.org/rL292102,
fixes next testcases under msvs2015/win32:

25>  Failing Tests (3):
25>      lld :: COFF/lldmap.test
25>      lld :: COFF/weak-external.test
25>      lld :: COFF/weak-external3.test

llvm-svn: 292104
2017-01-16 11:46:55 +00:00
Rui Ueyama 483ffa3365 Simplify string output. NFC.
llvm-svn: 292042
2017-01-15 01:11:47 +00:00
Rui Ueyama 543731f96a Directly write to a -Map file.
Previous code had a bug that if the program exits with an assert() or
fail() before the control reaches end of writeMapFile(), it leaves a
temporary file, because FileRemover's dtor isn't called in that case.

I could fix that by removeFileOnSignal() and other functions, but
I think we can simply write to the result file directly. I think
that is straightforward and easy to understand.

Additionally, that allows something like `-Map /dev/null` or a bash
hack such as `-Map >(grep symbol-im-looking-for)`. Previously,
that kind of things didn't work.

Differential Revision: https://reviews.llvm.org/D28714

llvm-svn: 292041
2017-01-15 00:41:21 +00:00
Peter Collingbourne 6f24fdb6a0 COFF: Change the /lldmap output format to be more like the ELF linker.
Differential Revision: https://reviews.llvm.org/D28717

llvm-svn: 291990
2017-01-14 03:14:46 +00:00