summaryrefslogtreecommitdiff
path: root/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-09-09 08:48:53 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-09-09 08:48:53 +0000
commit4c0b349253d6de7054fd38fe8492fb32a19f21b6 (patch)
tree3d874d262f9fa5275e9987d1f8cb217a5d2db1b0 /lib/Target/TargetLoweringObjectFile.cpp
parent8ddb569d8a1831f0e061e2f490d61bccd4166ec4 (diff)
downloadllvm-4c0b349253d6de7054fd38fe8492fb32a19f21b6.tar.gz
llvm-4c0b349253d6de7054fd38fe8492fb32a19f21b6.tar.bz2
llvm-4c0b349253d6de7054fd38fe8492fb32a19f21b6.tar.xz
Provide proper section flags for various BSS flavours
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--lib/Target/TargetLoweringObjectFile.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index 61bf5b0357..825a9d3c97 100644
--- a/lib/Target/TargetLoweringObjectFile.cpp
+++ b/lib/Target/TargetLoweringObjectFile.cpp
@@ -439,8 +439,12 @@ getELFKindForNamedSection(const char *Name, SectionKind K) {
if (Name[0] != '.') return K;
// Some lame default implementation based on some magic section names.
- if (strncmp(Name, ".gnu.linkonce.b.", 16) == 0 ||
+ if (strcmp(Name, ".bss") == 0 ||
+ strncmp(Name, ".bss.", 5) == 0 ||
+ strncmp(Name, ".gnu.linkonce.b.", 16) == 0 ||
strncmp(Name, ".llvm.linkonce.b.", 17) == 0 ||
+ strcmp(Name, ".sbss") == 0 ||
+ strncmp(Name, ".sbss.", 6) == 0 ||
strncmp(Name, ".gnu.linkonce.sb.", 17) == 0 ||
strncmp(Name, ".llvm.linkonce.sb.", 18) == 0)
return SectionKind::getBSS();