Skip to content

Commit 34a1101

Browse files
committed
[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 llvm-svn: 323598
1 parent 551a4d6 commit 34a1101

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lld/COFF/Writer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,8 @@ void Writer::createSymbolAndStringTable() {
581581
continue;
582582
// If a section isn't discardable (i.e. will be mapped at runtime),
583583
// prefer a truncated section name over a long section name in
584-
// the string table that is unavailable at runtime. This is different from
585-
// what link.exe does, but finding ".eh_fram" instead of "/4" is useful
586-
// to libunwind.
584+
// the string table that is unavailable at runtime. Note that link.exe
585+
// always truncates, even for discardable sections.
587586
if ((Sec->getPermissions() & IMAGE_SCN_MEM_DISCARDABLE) == 0)
588587
continue;
589588
Sec->setStringTableOff(addEntryToStringTable(Name));

0 commit comments

Comments
 (0)