summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ELFWriter.h
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-06-05 00:22:10 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-06-05 00:22:10 +0000
commit5d4191039645f2eeb90148d7359199ad21c75347 (patch)
tree9265142bcd2e2d85eb1ecf56d1467429e060634c /lib/CodeGen/ELFWriter.h
parent9f5f322a032cc22b5375cf698ac58fe7644547c0 (diff)
downloadllvm-5d4191039645f2eeb90148d7359199ad21c75347.tar.gz
llvm-5d4191039645f2eeb90148d7359199ad21c75347.tar.bz2
llvm-5d4191039645f2eeb90148d7359199ad21c75347.tar.xz
ELF Code Emitter now uses CurBufferPtr, BufferBegin and BufferEnd, as do JIT and
MachO Writer. This will change with the arrival of ObjectCodeEmitter and BinaryObject git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ELFWriter.h')
-rw-r--r--lib/CodeGen/ELFWriter.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/ELFWriter.h b/lib/CodeGen/ELFWriter.h
index 31aa05a9c4..63d692bda1 100644
--- a/lib/CodeGen/ELFWriter.h
+++ b/lib/CodeGen/ELFWriter.h
@@ -168,6 +168,12 @@ namespace llvm {
return *SN;
}
+ ELFSection &getTextSection() {
+ return getSection(".text", ELFWriter::ELFSection::SHT_PROGBITS,
+ ELFWriter::ELFSection::SHF_EXECINSTR |
+ ELFWriter::ELFSection::SHF_ALLOC);
+ }
+
ELFSection &getDataSection() {
return getSection(".data", ELFSection::SHT_PROGBITS,
ELFSection::SHF_WRITE | ELFSection::SHF_ALLOC);