forked from OSchip/llvm-project
-Bsymbolic should not make symbols more preemptable.
But it was doing that for protected undefined symbols. llvm-svn: 274803
This commit is contained in:
parent
3e3652aef2
commit
580d7a1b1e
|
@ -129,11 +129,14 @@ bool SymbolBody::isPreemptible() const {
|
|||
if (!symbol()->includeInDynsym())
|
||||
return false;
|
||||
|
||||
// Normally only default visibility symbols can be preempted, but -Bsymbolic
|
||||
// means that not even they can be preempted.
|
||||
// Only default visibility symbols can be preempted.
|
||||
if (symbol()->Visibility != STV_DEFAULT)
|
||||
return false;
|
||||
|
||||
// -Bsymbolic means that definitions are not preempted.
|
||||
if (Config->Bsymbolic || (Config->BsymbolicFunctions && isFunc()))
|
||||
return !isDefined();
|
||||
return symbol()->Visibility == STV_DEFAULT;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class ELFT> InputFile *SymbolBody::getSourceFile() {
|
||||
|
|
|
@ -28,3 +28,7 @@ nop
|
|||
do:
|
||||
callq foo@PLT
|
||||
callq bar@PLT
|
||||
|
||||
.weak zed
|
||||
.protected zed
|
||||
.quad zed
|
||||
|
|
Loading…
Reference in New Issue