aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-09-15 21:48:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-09-15 21:48:40 +0000
commitf667d929ce17f686fcd667045f5943890401dda9 (patch)
tree6195d964f715f45fbca4d1bbe835124fc2b9c7b5 /llvm/lib/MC/MCAssembler.cpp
parent44857a38fa5d04d04bca44fdfc0026ae33a014f7 (diff)
downloadllvm-f667d929ce17f686fcd667045f5943890401dda9.zip
llvm-f667d929ce17f686fcd667045f5943890401dda9.tar.gz
llvm-f667d929ce17f686fcd667045f5943890401dda9.tar.bz2
Add a InitSections method to the streamer interface.
The ELF implementation now creates text, data and bss to match the gnu as behavior. The text streamer still has the old MachO specific behavior since the testsuite checks that it will error when a directive is given before a setting the current section for example. A nice benefit is that -n is not required anymore when producing ELF files. llvm-svn: 114027
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index 8db1536..bb12499 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -739,7 +739,7 @@ void MCAssembler::Finish(MCObjectWriter *Writer) {
// Create dummy fragments to eliminate any empty sections, this simplifies
// layout.
if (it->getFragmentList().empty())
- new MCFillFragment(0, 1, 0, it);
+ new MCDataFragment(it);
it->setOrdinal(SectionIndex++);
}