blob: ab3c5922e75da0e4a4473f4a5abb0465b10509cd [file] [log] [blame]
Chris Lattner4b49e5d2009-07-25 17:57:37 +00001; RUN: llvm-as < %s | llc -mtriple=i386-unknown-linux-gnu | FileCheck %s -check-prefix=LINUX
Chris Lattnerd49fec92009-07-26 00:51:36 +00002; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin9.7 | FileCheck %s -check-prefix=DARWIN
Chris Lattner4b49e5d2009-07-25 17:57:37 +00003
Chris Lattnerd49fec92009-07-26 00:51:36 +00004
5; int G1;
Chris Lattner4b49e5d2009-07-25 17:57:37 +00006@G1 = common global i32 0
7
8; LINUX: .type G1,@object
9; LINUX: .section .gnu.linkonce.b.G1,"aw",@nobits
10; LINUX: .comm G1,4,4
11
Chris Lattnerd49fec92009-07-26 00:51:36 +000012; DARWIN: .comm _G1,4,2
13
14
15
16
17; const int G2 __attribute__((weak)) = 42;
18@G2 = weak_odr constant i32 42
19
20
21; TODO: linux drops this into .rodata, we drop it into ".gnu.linkonce.r.G2"
22
23; DARWIN: .section __TEXT,__const_coal,coalesced
24; DARWIN: _G2:
25; DARWIN: .long 42