diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 12:57:14 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 12:57:14 +0000 |
commit | cbb70ce070d220642b038ea101d9c0f9fbf860d6 (patch) | |
tree | d2b61ce94e654cb01a254d2195259db5f9cc3f3c /lib/Target/TargetLoweringObjectFile.cpp | |
parent | 4ace901e87dac5bbbac78ed325e75462e48e386e (diff) | |
download | FreeBSD-src-cbb70ce070d220642b038ea101d9c0f9fbf860d6.zip FreeBSD-src-cbb70ce070d220642b038ea101d9c0f9fbf860d6.tar.gz |
Vendor import of llvm trunk r126079:
http://llvm.org/svn/llvm-project/llvm/trunk@126079
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | lib/Target/TargetLoweringObjectFile.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index dd7b532..5d34c7d 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/lib/Target/TargetLoweringObjectFile.cpp @@ -43,8 +43,8 @@ TargetLoweringObjectFile::TargetLoweringObjectFile() : Ctx(0) { StaticCtorSection = 0; StaticDtorSection = 0; LSDASection = 0; - EHFrameSection = 0; + CommDirectiveSupportsAlignment = true; DwarfAbbrevSection = 0; DwarfInfoSection = 0; DwarfLineSection = 0; @@ -168,6 +168,12 @@ SectionKind TargetLoweringObjectFile::getKindForGlobal(const GlobalValue *GV, switch (C->getRelocationInfo()) { default: assert(0 && "unknown relocation info kind"); case Constant::NoRelocation: + // If the global is required to have a unique address, it can't be put + // into a mergable section: just drop it into the general read-only + // section instead. + if (!GVar->hasUnnamedAddr()) + return SectionKind::getReadOnly(); + // If initializer is a null-terminated string, put it in a "cstring" // section of the right width. if (const ArrayType *ATy = dyn_cast<ArrayType>(C->getType())) { |