ia64 target problems with ELF sections

Hi,

Compilation of the the following very simple file crashes with
--march=ia64 on my x86 machine.

; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i386-pc-linux-gnu"
@x = weak global [8 x i32] zeroinitializer, align 32 ; <[8
x i32]*> [#uses=0]
@.str = internal constant [4 x i8] c"%c \00" ; <[4 x i8]*> [#uses=0]
@rows = weak global [8 x i32] zeroinitializer, align 32 ; <[8
x i32]*> [#uses=0]
@up = weak global [15 x i32] zeroinitializer, align 32 ; <[15
x i32]*> [#uses=0]
@down = weak global [15 x i32] zeroinitializer, align 32
; <[15 x i32]*> [#uses=0]

declare i32 @print() nounwind

declare i32 @printf(i8*, ...) nounwind

declare i32 @putchar(i32)

declare i32 @queens(i32) nounwind

define i32 @main() nounwind {
entry:
        unreachable
}

I use this command to compile:
llc -f bugpoint-reduced-simplified.bc --regalloc=linearscan --march=ia64

The assertion is:

llc: /opt/llvm/lib/Target/ELFTargetAsmInfo.cpp:133: const
llvm::Section* llvm::ELFTargetAsmInfo::MergeableStringSection(const
llvm::GlobalVariable*) const: Assertion `getCStringSection() &&
"Should have string section prefix"' failed.

Is it a bug in the ia64 backend?

Thanks,
-Roman

P.S. BC file is attached.

bugpoint-reduced-simplified.bc (576 Bytes)

Hello, Roman

llc: /opt/llvm/lib/Target/ELFTargetAsmInfo.cpp:133: const
llvm::Section* llvm::ELFTargetAsmInfo::MergeableStringSection(const
llvm::GlobalVariable*) const: Assertion `getCStringSection() &&
"Should have string section prefix"' failed.

Is it a bug in the ia64 backend?

In general - yes. Please file a PR. I should introduce a fallback for such case.

Done!

Bugzilla PR for this problem can be found here:
http://llvm.org/bugs/show_bug.cgi?id=3327

-Roman