Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lld/MachO/BPSectionOrderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ DenseMap<const InputSection *, int> lld::macho::runBalancedPartitioning(
auto *isec = subsec.isec;
if (!isec || isec->data.empty() || !isec->data.data())
continue;
// CString section order is handled by
// {Deduplicated}CStringSection::finalizeContents()
if (isa<CStringInputSection>(isec) || isec->isFinal)
continue;
// ConcatInputSections are entirely live or dead, so the offset is
// irrelevant.
if (isa<ConcatInputSection>(isec) && !isec->isLive(0))
Expand Down
5 changes: 5 additions & 0 deletions lld/test/MachO/bp-section-orderer.s
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ r3:
r4:
.quad s2

# cstrings are ignored by runBalancedPartitioning()
.cstring
cstr:
.asciz "this is cstr"

.bss
bss0:
.zero 10
Expand Down