[PATCH] D120676: [LLD] [COFF] Use the new encodeSectionName() helper for long section names
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 01:35:30 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9dd2d50984f5: [LLD] [COFF] Use the new encodeSectionName() helper for long section names (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120676/new/
https://reviews.llvm.org/D120676
Files:
lld/COFF/Writer.cpp
Index: lld/COFF/Writer.cpp
===================================================================
--- lld/COFF/Writer.cpp
+++ lld/COFF/Writer.cpp
@@ -332,7 +332,7 @@
*hdr = header;
if (stringTableOff) {
// If name is too long, write offset into the string table as a name.
- sprintf(hdr->Name, "/%d", stringTableOff);
+ encodeSectionName(hdr->Name, stringTableOff);
} else {
assert(!config->debug || name.size() <= COFF::NameSize ||
(hdr->Characteristics & IMAGE_SCN_MEM_DISCARDABLE) == 0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120676.412011.patch
Type: text/x-patch
Size: 525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220301/8230f137/attachment.bin>
More information about the llvm-commits
mailing list