[llvm-commits] [llvm] r77196 - in /llvm/trunk/lib/Target: DarwinTargetAsmInfo.cpp ELFTargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Mon Jul 27 09:20:59 PDT 2009
Author: lattner
Date: Mon Jul 27 11:20:58 2009
New Revision: 77196
URL: http://llvm.org/viewvc/llvm-project?rev=77196&view=rev
Log:
sink text/data section creation down into the target-specific places that
should know about them. PECoff doesn't share these, and I want all sections
to be created by object-file-specific code.
Modified:
llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=77196&r1=77195&r2=77196&view=diff
==============================================================================
--- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Mon Jul 27 11:20:58 2009
@@ -27,6 +27,8 @@
DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM)
: TargetAsmInfo(TM) {
+ TextSection = getOrCreateSection("\t.text", true, SectionKind::Text);
+ DataSection = getOrCreateSection("\t.data", true, SectionKind::DataRel);
CStringSection_ = getOrCreateSection("\t.cstring", true,
SectionKind::MergeableCString);
@@ -50,7 +52,6 @@
SectionKind::ReadOnlyWithRel);
DataCoalSection = getOrCreateSection("\t__DATA,__datacoal_nt,coalesced",
false, SectionKind::DataRel);
-
// Common settings for all Darwin targets.
// Syntax:
Modified: llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp?rev=77196&r1=77195&r2=77196&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Mon Jul 27 11:20:58 2009
@@ -26,6 +26,9 @@
ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM)
: TargetAsmInfo(TM) {
+
+ TextSection = getOrCreateSection("\t.text", true, SectionKind::Text);
+ DataSection = getOrCreateSection("\t.data", true, SectionKind::DataRel);
ReadOnlySection =
getOrCreateSection("\t.rodata", false, SectionKind::ReadOnly);
TLSDataSection =
More information about the llvm-commits
mailing list