1*9880d681SAndroid Build Coastguard Worker// The purpose of this test is to verify that we produce relocations for 2*9880d681SAndroid Build Coastguard Worker// references to functions. Failing to do so might cause pointer-to-function 3*9880d681SAndroid Build Coastguard Worker// equality to fail if /INCREMENTAL links are used. 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -filetype=obj -incremental-linker-compatible -triple i686-pc-win32 %s | llvm-readobj -s | FileCheck %s 6*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -filetype=obj -incremental-linker-compatible -triple x86_64-pc-win32 %s | llvm-readobj -s | FileCheck %s 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker .def _foo; 9*9880d681SAndroid Build Coastguard Worker .scl 2; 10*9880d681SAndroid Build Coastguard Worker .type 32; 11*9880d681SAndroid Build Coastguard Worker .endef 12*9880d681SAndroid Build Coastguard Worker .text 13*9880d681SAndroid Build Coastguard Worker .globl _foo 14*9880d681SAndroid Build Coastguard Worker .align 16, 0x90 15*9880d681SAndroid Build Coastguard Worker_foo: # @foo 16*9880d681SAndroid Build Coastguard Worker# BB#0: # %e 17*9880d681SAndroid Build Coastguard Worker .align 16, 0x90 18*9880d681SAndroid Build Coastguard WorkerLBB0_1: # %i 19*9880d681SAndroid Build Coastguard Worker # =>This Inner Loop Header: Depth=1 20*9880d681SAndroid Build Coastguard Worker jmp LBB0_1 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker .def _bar; 23*9880d681SAndroid Build Coastguard Worker .scl 2; 24*9880d681SAndroid Build Coastguard Worker .type 32; 25*9880d681SAndroid Build Coastguard Worker .endef 26*9880d681SAndroid Build Coastguard Worker .globl _bar 27*9880d681SAndroid Build Coastguard Worker .align 16, 0x90 28*9880d681SAndroid Build Coastguard Worker_bar: # @bar 29*9880d681SAndroid Build Coastguard Worker# BB#0: # %e 30*9880d681SAndroid Build Coastguard Worker .align 16, 0x90 31*9880d681SAndroid Build Coastguard WorkerLBB1_1: # %i 32*9880d681SAndroid Build Coastguard Worker # =>This Inner Loop Header: Depth=1 33*9880d681SAndroid Build Coastguard Worker jmp LBB1_1 34*9880d681SAndroid Build Coastguard Worker 35*9880d681SAndroid Build Coastguard Worker .def _baz; 36*9880d681SAndroid Build Coastguard Worker .scl 2; 37*9880d681SAndroid Build Coastguard Worker .type 32; 38*9880d681SAndroid Build Coastguard Worker .endef 39*9880d681SAndroid Build Coastguard Worker .globl _baz 40*9880d681SAndroid Build Coastguard Worker .align 16, 0x90 41*9880d681SAndroid Build Coastguard Worker_baz: # @baz 42*9880d681SAndroid Build Coastguard Worker# BB#0: # %e 43*9880d681SAndroid Build Coastguard Worker subl $4, %esp 44*9880d681SAndroid Build Coastguard WorkerLtmp0: 45*9880d681SAndroid Build Coastguard Worker call _baz 46*9880d681SAndroid Build Coastguard Worker addl $4, %esp 47*9880d681SAndroid Build Coastguard Worker ret 48*9880d681SAndroid Build Coastguard Worker 49*9880d681SAndroid Build Coastguard Worker// CHECK: Sections [ 50*9880d681SAndroid Build Coastguard Worker// CHECK: RelocationCount: 1 51