Skip to content

Commit 6ec4672

Browse files
authored
[BOLT][NFC] Adjust misleading comment & formatting (#88409)
This originally dealt with tbss, but now handles any bss-like section. So the comment is inaccurate. Also, the `{}` on the messaging seem unnecessary.
1 parent ab037c4 commit 6ec4672

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4300,18 +4300,17 @@ RewriteInstance::getOutputSections(ELFObjectFile<ELFT> *File,
43004300
for (auto &SectionKV : OutputSections) {
43014301
ELFShdrTy &Section = SectionKV.second;
43024302

4303-
// Ignore TLS sections as they don't take any space in the file.
4303+
// Ignore NOBITS sections as they don't take any space in the file.
43044304
if (Section.sh_type == ELF::SHT_NOBITS)
43054305
continue;
43064306

43074307
// Note that address continuity is not guaranteed as sections could be
43084308
// placed in different loadable segments.
43094309
if (PrevSection &&
43104310
PrevSection->sh_offset + PrevSection->sh_size > Section.sh_offset) {
4311-
if (opts::Verbosity > 1) {
4311+
if (opts::Verbosity > 1)
43124312
BC->outs() << "BOLT-INFO: adjusting size for section "
43134313
<< PrevBinSec->getOutputName() << '\n';
4314-
}
43154314
PrevSection->sh_size = Section.sh_offset - PrevSection->sh_offset;
43164315
}
43174316

0 commit comments

Comments
 (0)