- P.formatLine(
- "SC | mod = {2}, {0}, size = {1}, data crc = {3}, reloc crc = {4}",
- formatSegmentOffset(SC.ISect, SC.Off), fmtle(SC.Size), fmtle(SC.Imod),
- fmtle(SC.DataCrc), fmtle(SC.RelocCrc));
+ assert(SC.ISect > 0);
+ StringRef SectionName = Names[SC.ISect - 1];
+ std::string NameInsert = formatv("[{0}]", SectionName).str();
+ P.formatLine("SC{5} | mod = {2}, {0}, size = {1}, data crc = {3}, reloc "
+ "crc = {4}",
+ formatSegmentOffset(SC.ISect, SC.Off), fmtle(SC.Size),
+ fmtle(SC.Imod), fmtle(SC.DataCrc), fmtle(SC.RelocCrc),
+ fmt_align(NameInsert, AlignStyle::Left, MaxNameLen + 2));
+ AutoIndent Indent(P, MaxNameLen + 2);