Skip to content

Commit

Permalink
[ELF] Remove unused setSymbolAndType after #69295. NFC
Browse files Browse the repository at this point in the history
One use of setSymbolAndType (related to https://reviews.llvm.org/D53864
"Do not crash when -r output uses linker script with `/DISCARD/`")
is no longer needed after commit 1981b1b
demotes symbols in discarded sections to Undefined.
  • Loading branch information
MaskRay committed Oct 17, 2023
1 parent 9aa571f commit bbf7b9d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lld/ELF/InputSection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,7 @@ void InputSection::copyRelocations(uint8_t *buf,
continue;
}
SectionBase *section = d->section;
if (!section->isLive()) {
p->setSymbolAndType(0, 0, false);
continue;
}
assert(section->isLive());

int64_t addend = rel.addend;
const uint8_t *bufLoc = sec->content().begin() + rel.offset;
Expand Down

0 comments on commit bbf7b9d

Please sign in to comment.