3f34cfbfb5ade57cf0a511799ea1f800ab6752b5
[deliverable/binutils-gdb.git] / ld / testsuite / ld-i386 / ifunc.s
1 .file "ifunc.c"
2 #APP
3 .type func, %indirect_function
4 .type long_func_name, %indirect_function
5 .section .rodata.str1.1,"aMS",@progbits,1
6 .LC0:
7 .string "arg is %d\n"
8 #NO_APP
9 .text
10 .p2align 4,,15
11 .globl bar
12 .type bar, @function
13 bar:
14 pushl %ebp
15 movl %esp, %ebp
16 subl $8, %esp
17 movl 8(%ebp), %eax
18 movl $.LC0, (%esp)
19 movl %eax, 4(%esp)
20 call printf
21 leave
22 ret
23 .size bar, .-bar
24 .section .rodata.str1.1
25 .LC1:
26 .string "main: calling func"
27 .section .rodata.str1.4,"aMS",@progbits,1
28 .align 4
29 .LC2:
30 .string "main: func finished, calling long_func_name"
31 .section .rodata.str1.1
32 .LC3:
33 .string "main: long_func_name finished"
34 .text
35 .p2align 4,,15
36 .globl main
37 .type main, @function
38 main:
39 leal 4(%esp), %ecx
40 andl $-16, %esp
41 pushl -4(%ecx)
42 pushl %ebp
43 movl %esp, %ebp
44 pushl %ecx
45 subl $4, %esp
46 movl $.LC1, (%esp)
47 call puts
48 call func
49 movl $.LC2, (%esp)
50 call puts
51 call long_func_name
52 movl $.LC3, (%esp)
53 call puts
54 addl $4, %esp
55 xorl %eax, %eax
56 popl %ecx
57 popl %ebp
58 leal -4(%ecx), %esp
59 ret
60 .size main, .-main
61 .p2align 4,,15
62 .globl long_func_name
63 .type long_func_name, @function
64 long_func_name:
65 pushl %ebp
66 movl %esp, %ebp
67 subl $8, %esp
68 call rand
69 movl $func0, %edx
70 testl %eax, %eax
71 jne .L7
72 movl $func1, %edx
73 .L7:
74 movl %edx, %eax
75 leave
76 ret
77 .size long_func_name, .-long_func_name
78 .p2align 4,,15
79 .globl func
80 .type func, @function
81 func:
82 pushl %ebp
83 movl %esp, %ebp
84 subl $8, %esp
85 call rand
86 movl $func0, %edx
87 testl %eax, %eax
88 jne .L12
89 movl $func1, %edx
90 .L12:
91 movl %edx, %eax
92 leave
93 ret
94 .size func, .-func
95 .section .rodata.str1.1
96 .LC4:
97 .string "func1\n"
98 .text
99 .p2align 4,,15
100 .globl func1
101 .type func1, @function
102 func1:
103 pushl %ebp
104 movl %esp, %ebp
105 subl $8, %esp
106 movl $.LC4, (%esp)
107 call puts
108 leave
109 ret
110 .size func1, .-func1
111 .section .rodata.str1.1
112 .LC5:
113 .string "func0\n"
114 .text
115 .p2align 4,,15
116 .globl func0
117 .type func0, @function
118 func0:
119 pushl %ebp
120 movl %esp, %ebp
121 subl $8, %esp
122 movl $.LC5, (%esp)
123 call puts
124 leave
125 ret
126 .size func0, .-func0
127 .ident "GCC: (GNU) 4.3.0 20080428 (Red Hat 4.3.0-8)"
128 .section .note.GNU-stack,"",@progbits
This page took 0.032141 seconds and 3 git commands to generate.