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