51 lines · plain
1// The purpose of this test is to verify that we produce relocations for2// references to functions. Failing to do so might cause pointer-to-function3// equality to fail if /INCREMENTAL links are used.4 5// RUN: llvm-mc -filetype=obj -incremental-linker-compatible -triple i686-pc-win32 %s | llvm-readobj -S - | FileCheck %s6// RUN: llvm-mc -filetype=obj -incremental-linker-compatible -triple x86_64-pc-win32 %s | llvm-readobj -S - | FileCheck %s7 8 .def _foo;9 .scl 2;10 .type 32;11 .endef12 .text13 .globl _foo14 .align 16, 0x9015_foo: # @foo16# %bb.0: # %e17 .align 16, 0x9018LBB0_1: # %i19 # =>This Inner Loop Header: Depth=120 jmp LBB0_121 22 .def _bar;23 .scl 2;24 .type 32;25 .endef26 .globl _bar27 .align 16, 0x9028_bar: # @bar29# %bb.0: # %e30 .align 16, 0x9031LBB1_1: # %i32 # =>This Inner Loop Header: Depth=133 jmp LBB1_134 35 .def _baz;36 .scl 2;37 .type 32;38 .endef39 .globl _baz40 .align 16, 0x9041_baz: # @baz42# %bb.0: # %e43 subl $4, %esp44Ltmp0:45 call _baz46 addl $4, %esp47 ret48 49// CHECK: Sections [50// CHECK: RelocationCount: 151