diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-09-22 20:39:23 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-09-22 20:39:23 +0000 |
commit | 597be2ded6eeb63914d0a044314136c5c68ecd33 (patch) | |
tree | a120512486ee095db6f4ea2ac1efd0e00e1bcd90 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 44deb8015ce95f699072ef8585f91dc991a45475 (diff) | |
download | bcm5719-llvm-597be2ded6eeb63914d0a044314136c5c68ecd33.tar.gz bcm5719-llvm-597be2ded6eeb63914d0a044314136c5c68ecd33.zip |
MC: ReadOnlyWithRel section kinds should map to rdata in COFF
Don't consider ReadOnlyWithRel as a writable section in COFF, they
really belong in .rdata.
llvm-svn: 218268
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 6d5e27c00e8..c7570ba76e1 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -865,9 +865,9 @@ static const char *getCOFFSectionNameForUniqueGlobal(SectionKind Kind) { return ".bss"; if (Kind.isThreadLocal()) return ".tls$"; - if (Kind.isWriteable()) - return ".data"; - return ".rdata"; + if (Kind.isReadOnly() || Kind.isReadOnlyWithRel()) + return ".rdata"; + return ".data"; } @@ -915,7 +915,7 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, if (Kind.isThreadLocal()) return TLSDataSection; - if (Kind.isReadOnly()) + if (Kind.isReadOnly() || Kind.isReadOnlyWithRel()) return ReadOnlySection; // Note: we claim that common symbols are put in BSSSection, but they are |