brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 90466b5 Raw
67 lines · plain
1// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | llvm-readobj -S --sr --sd - | FileCheck %s2 3// COFF resolves differences between labels in the same section, unless that4// label is declared with function type.5 6.section baz, "xr"7	.globl	X8X:9	mov	Y-X+42,	%eax10	retl11 12	.globl	Y13Y:14	retl15 16	.def	 _foobar;17	.scl	2;18	.type	32;19	.endef20	.text21	.long   022	.globl	_foobar23	.align	16, 0x9024_foobar:                                # @foobar25# %bb.0:26	ret27 28	.globl	_baz29_baz:30	calll	_foobar31	retl32 33	.data34	.globl	_rust_crate             # @rust_crate35	.align	436_rust_crate:37	.long   038	.long   _foobar39	.long	_foobar-_rust_crate40	.long	_foobar-_rust_crate41 42// Even though _baz and _foobar are in the same .text section, we keep the43// relocation for compatibility with the VC linker's /guard:cf and /incremental44// flags, even on mingw.45 46// CHECK:        Name: .text47// CHECK:        Relocations [48// CHECK-NEXT:     0x12 IMAGE_REL_I386_REL32 _foobar49// CHECK-NEXT:   ]50 51// CHECK:        Name: .data52// CHECK:        Relocations [53// CHECK-NEXT:     0x4 IMAGE_REL_I386_DIR32 _foobar54// CHECK-NEXT:     0x8 IMAGE_REL_I386_REL32 _foobar55// CHECK-NEXT:     0xC IMAGE_REL_I386_REL32 _foobar56// CHECK-NEXT:   ]57// CHECK:        SectionData (58// CHECK-NEXT:     0000: 00000000 00000000 0C000000 1000000059// CHECK-NEXT:   )60 61// CHECK:        Name: baz62// CHECK:        Relocations [63// CHECK-NEXT:   ]64// CHECK:        SectionData (65// CHECK-NEXT:     0000: A1300000 00C3C366// CHECK-NEXT:   )67