Skip to content

Commit bf7cb60

Browse files
committed
Trust the symbol reference; it's all we've got
1 parent 6c0232b commit bf7cb60

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lld/ELF/MarkLive.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,10 @@ void MarkLive<ELFT>::resolveReloc(InputSectionBase &sec, RelTy &rel,
132132
// discarded, marking the LSDA will unnecessarily retain the text section.
133133
if (!(fromFDE && ((relSec->flags & (SHF_EXECINSTR | SHF_LINK_ORDER)) ||
134134
relSec->nextInSectionGroup))) {
135-
Symbol *canonicalSym = nullptr;
136-
if (!d->isSection()) {
137-
if (offset < d->value + d->size)
138-
canonicalSym = d;
139-
else if (Symbol *s = relSec->getEnclosingSymbol(offset))
135+
Symbol *canonicalSym = d;
136+
if (d->isSection())
137+
if (Symbol *s = relSec->getEnclosingSymbol(offset))
140138
canonicalSym = s;
141-
}
142139
enqueue(relSec, offset, canonicalSym, parent);
143140
}
144141
return;

0 commit comments

Comments
 (0)