Skip to content

Commit 9d4294a

Browse files
committed
review comments
Created using spr 1.3.5-bogner
1 parent 31160cb commit 9d4294a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lld/ELF/InputSection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,14 +1365,14 @@ template <class ELFT> void EhInputSection::split() {
13651365
preprocessRelocs<ELFT>(elfRels.rels);
13661366
else
13671367
preprocessRelocs<ELFT>(elfRels.relas);
1368+
1369+
// The loop below expects the relocations to be sorted by offset.
13681370
auto cmp = [](const Relocation &a, const Relocation &b) {
13691371
return a.offset < b.offset;
13701372
};
13711373
if (!llvm::is_sorted(rels, cmp))
13721374
llvm::stable_sort(rels, cmp);
13731375

1374-
// getReloc expects the relocations to be sorted by r_offset. See the comment
1375-
// in scanRelocs.
13761376
ArrayRef<uint8_t> d = content();
13771377
const char *msg = nullptr;
13781378
unsigned relI = 0;

lld/ELF/MarkLive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void MarkLive<ELFT, TrackWhyLive>::resolveReloc(InputSectionBase &sec,
155155
// associated text section is live, the LSDA will be retained due to section
156156
// group/SHF_LINK_ORDER rules (b) if the associated text section should be
157157
// discarded, marking the LSDA will unnecessarily retain the text section.
158-
if (!(std::is_same_v<RelTy, Relocation> && fromFDE &&
158+
if (!(fromFDE && std::is_same_v<RelTy, Relocation> &&
159159
((relSec->flags & (SHF_EXECINSTR | SHF_LINK_ORDER)) ||
160160
relSec->nextInSectionGroup))) {
161161
Symbol *canonicalSym = d;

0 commit comments

Comments
 (0)