1// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | llvm-readobj -s -sr -sd | FileCheck %s
2
3.section baz, "xr"
4	.def	X
5	.scl	2;
6	.type	32;
7	.endef
8	.globl	X
9X:
10	mov	Y-X+42,	%eax
11	retl
12
13	.def	Y
14	.scl	2;
15	.type	32;
16	.endef
17	.globl	Y
18Y:
19	retl
20
21	.def	 _foobar;
22	.scl	2;
23	.type	32;
24	.endef
25	.text
26	.long   0
27	.globl	_foobar
28	.align	16, 0x90
29_foobar:                                # @foobar
30# BB#0:
31	ret
32
33	.data
34	.globl	_rust_crate             # @rust_crate
35	.align	4
36_rust_crate:
37	.long   0
38	.long   _foobar
39	.long	_foobar-_rust_crate
40	.long	_foobar-_rust_crate
41
42// CHECK:        Name: .data
43// CHECK:        Relocations [
44// CHECK-NEXT:     0x4 IMAGE_REL_I386_DIR32 _foobar
45// CHECK-NEXT:     0x8 IMAGE_REL_I386_REL32 .text
46// CHECK-NEXT:     0xC IMAGE_REL_I386_REL32 .text
47// CHECK-NEXT:   ]
48// CHECK:        SectionData (
49// CHECK-NEXT:     0000: 00000000 00000000 1C000000 20000000
50// CHECK-NEXT:   )
51
52// CHECK:        Name: baz
53// CHECK:        Relocations [
54// CHECK-NEXT:   ]
55// CHECK:        SectionData (
56// CHECK-NEXT:     0000: A1300000 00C3C3
57// CHECK-NEXT:   )
58