[lld] r323598 - [COFF] Update comment to reflect link.exe behavior. NFC
Shoaib Meenai via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 27 10:17:08 PST 2018
Author: smeenai
Date: Sat Jan 27 10:17:08 2018
New Revision: 323598
URL: http://llvm.org/viewvc/llvm-project?rev=323598&view=rev
Log:
[COFF] Update comment to reflect link.exe behavior. NFC
In my experimentation with link.exe from both VS 2015 and 2017, it
always produces images with truncated section names. Update the comment
accordingly.
Differential Revision: https://reviews.llvm.org/D42603
Modified:
lld/trunk/COFF/Writer.cpp
Modified: lld/trunk/COFF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.cpp?rev=323598&r1=323597&r2=323598&view=diff
==============================================================================
--- lld/trunk/COFF/Writer.cpp (original)
+++ lld/trunk/COFF/Writer.cpp Sat Jan 27 10:17:08 2018
@@ -581,9 +581,8 @@ void Writer::createSymbolAndStringTable(
continue;
// If a section isn't discardable (i.e. will be mapped at runtime),
// prefer a truncated section name over a long section name in
- // the string table that is unavailable at runtime. This is different from
- // what link.exe does, but finding ".eh_fram" instead of "/4" is useful
- // to libunwind.
+ // the string table that is unavailable at runtime. Note that link.exe
+ // always truncates, even for discardable sections.
if ((Sec->getPermissions() & IMAGE_SCN_MEM_DISCARDABLE) == 0)
continue;
Sec->setStringTableOff(addEntryToStringTable(Name));
More information about the llvm-commits
mailing list