Skip to content
Closed
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
3 changes: 2 additions & 1 deletion lld/ELF/SyntheticSections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3800,7 +3800,8 @@ VersionTableSection::VersionTableSection(Ctx &ctx)
void VersionTableSection::finalizeContents() {
// At the moment of june 2016 GNU docs does not mention that sh_link field
// should be set, but Sun docs do. Also readelf relies on this field.
getParent()->link = getPartition(ctx).dynSymTab->getParent()->sectionIndex;
if (OutputSection *sec = getPartition(ctx).dynSymTab->getParent())
getParent()->link = sec->sectionIndex;
}

size_t VersionTableSection::getSize() const {
Expand Down
Loading