diff options
author | Nate Begeman <natebegeman@mac.com> | 2004-10-17 23:01:34 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2004-10-17 23:01:34 +0000 |
commit | fcf4a42cdf5d34b7761f34e3cb978b4cef93e2cb (patch) | |
tree | 91b8696263ff27f432a85a853ed1d2b49748d9b7 | |
parent | cfbf9faaa4f1c92a746c8681ecd3bc52ad5313e8 (diff) | |
download | external_llvm-fcf4a42cdf5d34b7761f34e3cb978b4cef93e2cb.zip external_llvm-fcf4a42cdf5d34b7761f34e3cb978b4cef93e2cb.tar.gz external_llvm-fcf4a42cdf5d34b7761f34e3cb978b4cef93e2cb.tar.bz2 |
Generate correct stubs for weak-linked symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17101 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index fdb7831..929538e 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -366,8 +366,9 @@ void PowerPCAsmPrinter::printOp(const MachineOperand &MO, return; } - // External global variables need a non-lazily-resolved stub - if (GV->isExternal() && getTM().AddressTaken.count(GV)) { + // External or weakly linked global variables need non-lazily-resolved stubs + if ((GV->isExternal() || GV->hasWeakLinkage()) && + getTM().AddressTaken.count(GV)) { GVStubs.insert(Name); O << "L" << Name << "$non_lazy_ptr"; return; |