lld: Don't write preemptible symbol values to the .got.
It is not necessary and matches what bfd and gold do. This was a regression from [LLVM] r315658. Obtained from: LLVM r321023 by Rafael Espíndola
This commit is contained in:
@@ -812,7 +812,7 @@ static void addGotEntry(SymbolBody &Sym, bool Preemptible) {
|
|||||||
//
|
//
|
||||||
// This is ugly -- the difference between REL and RELA should be
|
// This is ugly -- the difference between REL and RELA should be
|
||||||
// handled in a better way. It's a TODO.
|
// handled in a better way. It's a TODO.
|
||||||
if (!Config->IsRela)
|
if (!Config->IsRela && !Preemptible)
|
||||||
InX::Got->Relocations.push_back({R_ABS, Target->GotRel, Off, 0, &Sym});
|
InX::Got->Relocations.push_back({R_ABS, Target->GotRel, Off, 0, &Sym});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user