Skip to content

Commit

Permalink
[COFF] Update comment to reflect link.exe behavior. NFC
Browse files Browse the repository at this point in the history
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

llvm-svn: 323598
  • Loading branch information
smeenai committed Jan 27, 2018
1 parent 551a4d6 commit 34a1101
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lld/COFF/Writer.cpp
Expand Up @@ -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));
Expand Down

0 comments on commit 34a1101

Please sign in to comment.