[LowerEmuTls] Copy dso_local from <var> to __emutls_v.<var>

This effect is not testable until we drop the implied dso_local for ELF
static/PIE defined symbols from TargetMachine::shouldAssumeDSOLocal.
This commit is contained in:
Fangrui Song 2020-12-30 16:11:31 -08:00
parent a964e0f085
commit f731839584
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ private:
GlobalVariable *to) {
to->setLinkage(from->getLinkage());
to->setVisibility(from->getVisibility());
to->setDSOLocal(from->isDSOLocal());
if (from->hasComdat()) {
to->setComdat(M.getOrInsertComdat(to->getName()));
to->getComdat()->setSelectionKind(from->getComdat()->getSelectionKind());