Home | History | Annotate | Download | only in COFF
      1 // The purpose of this test is to verify that we do not produce unneeded
      2 // relocations when symbols are in the same section and we know their offset.
      3 
      4 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s | FileCheck %s
      5 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s | FileCheck %s
      6 
      7 	.def	 _foo;
      8 	.scl	2;
      9 	.type	32;
     10 	.endef
     11 	.text
     12 	.globl	_foo
     13 	.align	16, 0x90
     14 _foo:                                   # @foo
     15 # BB#0:                                 # %e
     16 	.align	16, 0x90
     17 LBB0_1:                                 # %i
     18                                         # =>This Inner Loop Header: Depth=1
     19 	jmp	LBB0_1
     20 
     21 	.def	 _bar;
     22 	.scl	2;
     23 	.type	32;
     24 	.endef
     25 	.globl	_bar
     26 	.align	16, 0x90
     27 _bar:                                   # @bar
     28 # BB#0:                                 # %e
     29 	.align	16, 0x90
     30 LBB1_1:                                 # %i
     31                                         # =>This Inner Loop Header: Depth=1
     32 	jmp	LBB1_1
     33 
     34 	.def	 _baz;
     35 	.scl	2;
     36 	.type	32;
     37 	.endef
     38 	.globl	_baz
     39 	.align	16, 0x90
     40 _baz:                                   # @baz
     41 # BB#0:                                 # %e
     42 	subl	$4, %esp
     43 Ltmp0:
     44 	call	_baz
     45 	addl	$4, %esp
     46 	ret
     47 
     48 // CHECK:     Sections [
     49 // CHECK-NOT: RelocationCount: {{[^0]}}
     50