if (flags & SectionFlags::Small)
Flags += 's';
- Flags += "\"";
+ Flags += "\",";
+
+ // If comment string is '@', e.g. as on ARM - use '%' instead
+ if (strcmp(CommentString, "@") == 0)
+ Flags += '%';
+ else
+ Flags += '@';
// FIXME: There can be exceptions here
if (flags & SectionFlags::BSS)
- Flags += ",@nobits";
+ Flags += "nobits";
else
- Flags += ",@progbits";
+ Flags += "progbits";
if (unsigned entitySize = SectionFlags::getEntitySize(flags))
Flags += "," + utostr(entitySize);
; RUN: llvm-as < %s | llc -mtriple=arm-linux | \
; RUN: grep {__DTOR_END__:}
; RUN: llvm-as < %s | llc -mtriple=arm-linux | \
-; RUN: grep {.section .dtors,"aw",.progbits}
+; RUN: grep {\\.section.\\.dtors,"aw",.progbits}
@__DTOR_END__ = internal global [1 x i32] zeroinitializer, section ".dtors" ; <[1 x i32]*> [#uses=0]