[PATCH] D42603: [COFF] Update comment to reflect link.exe behavior. NFC

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 14:53:14 PST 2018


smeenai created this revision.
smeenai added reviewers: mstorsjo, rnk, ruiu.

In my experimentation with link.exe from both VS 2015 and 2017, it
always produces images with truncated section names. Update the comment
accordingly.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42603

Files:
  COFF/Writer.cpp


Index: COFF/Writer.cpp
===================================================================
--- COFF/Writer.cpp
+++ COFF/Writer.cpp
@@ -561,9 +561,8 @@
       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));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42603.131661.patch
Type: text/x-patch
Size: 763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180126/c7cf85c8/attachment.bin>


More information about the llvm-commits mailing list