summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@freebsd.org>2012-02-28 18:15:25 +0000
committerRoman Divacky <rdivacky@freebsd.org>2012-02-28 18:15:25 +0000
commit34d4b9682be0aa120dfad7a3eb39c38003c246a0 (patch)
treeae9e0a9b5153972bd65e3b20e1f16e0fdb9fb2a5 /llvm
parent051390fffab6f63a76ca919d2fe8e4c5f1ba13f2 (diff)
downloadbcm5719-llvm-34d4b9682be0aa120dfad7a3eb39c38003c246a0.tar.gz
bcm5719-llvm-34d4b9682be0aa120dfad7a3eb39c38003c246a0.zip
Properly MCize the section switch, removing a FIXME.
llvm-svn: 151639
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 7e6403b6c43..591ae020aa3 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -422,8 +422,10 @@ bool PPCLinuxAsmPrinter::doFinalization(Module &M) {
bool isPPC64 = TD->getPointerSizeInBits() == 64;
if (isPPC64 && !TOC.empty()) {
- // FIXME 64-bit SVR4: Use MCSection here?
- OutStreamer.EmitRawText(StringRef("\t.section\t\".toc\",\"aw\""));
+ const MCSectionELF *Section = OutStreamer.getContext().getELFSection(".toc",
+ ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC,
+ SectionKind::getReadOnly());
+ OutStreamer.SwitchSection(Section);
// FIXME: This is nondeterminstic!
for (DenseMap<MCSymbol*, MCSymbol*>::iterator I = TOC.begin(),
OpenPOWER on IntegriCloud