1 .file "test.c"
2 .intel_syntax noprefix
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
53 .Ltext0:
54
55
56 .p2align 4,,15
57 .globl some_function
59 some_function:
60 .LFB22:
61 .file 1 "test.c"
1:test.c ****
2:test.c ****
3:test.c **** int some_function(int a)
4:test.c **** {
62 .loc 1 4 0
63 .cfi_startproc
64 .LVL0:
5:test.c **** a *= 5; // a is not really needed.
6:test.c **** return 42;
7:test.c **** }
65 .loc 1 7 0
66 0000 B82A0000 mov eax, 42
66 00
67 0005 C3 ret
68 .cfi_endproc
69 .LFE22:
71 .section .rodata.str1.1,"aMS",@progbits,1
72 .LC0:
73 0000 54686973 .string "This is a test program."
73 20697320
73 61207465
73 73742070
73 726F6772
74 .text
75 0006 662E0F1F .p2align 4,,15
75 84000000
75 0000
76 .globl main
78 main:
79 .LFB23:
8:test.c ****
9:test.c **** int main(int argc, char* argv[])
10:test.c **** {
80 .loc 1 10 0
81 .cfi_startproc
82 .LVL1:
83 0010 4883EC08 sub rsp, 8
84 .LCFI0:
85 .cfi_def_cfa_offset 16
86 .file 2 "/usr/include/bits/stdio2.h"
1:/usr/include/bits/stdio2.h **** /* Checking macros for stdio functions.
2:/usr/include/bits/stdio2.h **** Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3:/usr/include/bits/stdio2.h **** This file is part of the GNU C Library.
4:/usr/include/bits/stdio2.h ****
5:/usr/include/bits/stdio2.h **** The GNU C Library is free software; you can redistribute it and/or
6:/usr/include/bits/stdio2.h **** modify it under the terms of the GNU Lesser General Public
7:/usr/include/bits/stdio2.h **** License as published by the Free Software Foundation; either
8:/usr/include/bits/stdio2.h **** version 2.1 of the License, or (at your option) any later version.
9:/usr/include/bits/stdio2.h ****
10:/usr/include/bits/stdio2.h **** The GNU C Library is distributed in the hope that it will be useful,
11:/usr/include/bits/stdio2.h **** but WITHOUT ANY WARRANTY; without even the implied warranty of
12:/usr/include/bits/stdio2.h **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13:/usr/include/bits/stdio2.h **** Lesser General Public License for more details.
14:/usr/include/bits/stdio2.h ****
15:/usr/include/bits/stdio2.h **** You should have received a copy of the GNU Lesser General Public
16:/usr/include/bits/stdio2.h **** License along with the GNU C Library; if not, write to the Free
17:/usr/include/bits/stdio2.h **** Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18:/usr/include/bits/stdio2.h **** 02111-1307 USA. */
19:/usr/include/bits/stdio2.h ****
20:/usr/include/bits/stdio2.h ****
21:/usr/include/bits/stdio2.h ****
22:/usr/include/bits/stdio2.h ****
23:/usr/include/bits/stdio2.h ****
24:/usr/include/bits/stdio2.h **** extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
25:/usr/include/bits/stdio2.h **** __const char *__restrict __format, ...) __THROW;
26:/usr/include/bits/stdio2.h **** extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
27:/usr/include/bits/stdio2.h **** __const char *__restrict __format,
28:/usr/include/bits/stdio2.h **** _G_va_list __ap) __THROW;
29:/usr/include/bits/stdio2.h ****
30:/usr/include/bits/stdio2.h ****
31:/usr/include/bits/stdio2.h **** __extern_always_inline int
32:/usr/include/bits/stdio2.h **** __NTH (sprintf (char *__restrict __s, __const char *__restrict __fmt, ...))
33:/usr/include/bits/stdio2.h **** {
34:/usr/include/bits/stdio2.h **** return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
35:/usr/include/bits/stdio2.h **** __bos (__s), __fmt, __va_arg_pack ());
36:/usr/include/bits/stdio2.h **** }
37:/usr/include/bits/stdio2.h ****
38:/usr/include/bits/stdio2.h ****
39:/usr/include/bits/stdio2.h **** __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), \
40:/usr/include/bits/stdio2.h **** __VA_ARGS__)
41:/usr/include/bits/stdio2.h ****
42:/usr/include/bits/stdio2.h ****
43:/usr/include/bits/stdio2.h **** __extern_always_inline int
44:/usr/include/bits/stdio2.h **** __NTH (vsprintf (char *__restrict __s, __const char *__restrict __fmt,
45:/usr/include/bits/stdio2.h **** _G_va_list __ap))
46:/usr/include/bits/stdio2.h **** {
47:/usr/include/bits/stdio2.h **** return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
48:/usr/include/bits/stdio2.h **** __bos (__s), __fmt, __ap);
49:/usr/include/bits/stdio2.h **** }
50:/usr/include/bits/stdio2.h ****
51:/usr/include/bits/stdio2.h ****
52:/usr/include/bits/stdio2.h ****
53:/usr/include/bits/stdio2.h **** extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
54:/usr/include/bits/stdio2.h **** size_t __slen, __const char *__restrict __format,
55:/usr/include/bits/stdio2.h **** ...) __THROW;
56:/usr/include/bits/stdio2.h **** extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
57:/usr/include/bits/stdio2.h **** size_t __slen, __const char *__restrict __format,
58:/usr/include/bits/stdio2.h **** _G_va_list __ap) __THROW;
59:/usr/include/bits/stdio2.h ****
60:/usr/include/bits/stdio2.h ****
61:/usr/include/bits/stdio2.h **** __extern_always_inline int
62:/usr/include/bits/stdio2.h **** __NTH (snprintf (char *__restrict __s, size_t __n,
63:/usr/include/bits/stdio2.h **** __const char *__restrict __fmt, ...))
64:/usr/include/bits/stdio2.h **** {
65:/usr/include/bits/stdio2.h **** return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
66:/usr/include/bits/stdio2.h **** __bos (__s), __fmt, __va_arg_pack ());
67:/usr/include/bits/stdio2.h **** }
68:/usr/include/bits/stdio2.h ****
69:/usr/include/bits/stdio2.h ****
70:/usr/include/bits/stdio2.h **** __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \
71:/usr/include/bits/stdio2.h **** __VA_ARGS__)
72:/usr/include/bits/stdio2.h ****
73:/usr/include/bits/stdio2.h ****
74:/usr/include/bits/stdio2.h **** __extern_always_inline int
75:/usr/include/bits/stdio2.h **** __NTH (vsnprintf (char *__restrict __s, size_t __n,
76:/usr/include/bits/stdio2.h **** __const char *__restrict __fmt, _G_va_list __ap))
77:/usr/include/bits/stdio2.h **** {
78:/usr/include/bits/stdio2.h **** return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
79:/usr/include/bits/stdio2.h **** __bos (__s), __fmt, __ap);
80:/usr/include/bits/stdio2.h **** }
81:/usr/include/bits/stdio2.h ****
82:/usr/include/bits/stdio2.h ****
83:/usr/include/bits/stdio2.h ****
84:/usr/include/bits/stdio2.h ****
85:/usr/include/bits/stdio2.h ****
86:/usr/include/bits/stdio2.h **** extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
87:/usr/include/bits/stdio2.h **** __const char *__restrict __format, ...);
88:/usr/include/bits/stdio2.h **** extern int __printf_chk (int __flag, __const char *__restrict __format, ...);
89:/usr/include/bits/stdio2.h **** extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
90:/usr/include/bits/stdio2.h **** __const char *__restrict __format, _G_va_list __ap);
91:/usr/include/bits/stdio2.h **** extern int __vprintf_chk (int __flag, __const char *__restrict __format,
92:/usr/include/bits/stdio2.h **** _G_va_list __ap);
93:/usr/include/bits/stdio2.h ****
94:/usr/include/bits/stdio2.h ****
95:/usr/include/bits/stdio2.h **** __extern_always_inline int
96:/usr/include/bits/stdio2.h **** fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...)
97:/usr/include/bits/stdio2.h **** {
98:/usr/include/bits/stdio2.h **** return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
99:/usr/include/bits/stdio2.h **** __va_arg_pack ());
100:/usr/include/bits/stdio2.h **** }
101:/usr/include/bits/stdio2.h ****
102:/usr/include/bits/stdio2.h **** __extern_always_inline int
103:/usr/include/bits/stdio2.h **** printf (__const char *__restrict __fmt, ...)
104:/usr/include/bits/stdio2.h **** {
105:/usr/include/bits/stdio2.h **** return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
87 .loc 2 105 0
88 0014 BF000000 mov edi, OFFSET FLAT:.LC0
88 00
89 .LVL2:
90 0019 E8000000 call puts
90 00
91 .LVL3:
11:test.c **** int variableA = 10;
12:test.c ****
13:test.c **** printf("This is a test program.\n");
14:test.c ****
15:test.c **** variableA += 5;
16:test.c **** variableA += some_function(20);
17:test.c ****
18:test.c **** return variableA;
19:test.c **** }
92 .loc 1 19 0
93 001e B8390000 mov eax, 57
93 00
94 0023 4883C408 add rsp, 8
95 .LCFI1:
96 .cfi_def_cfa_offset 8
97 0027 C3 ret
98 .cfi_endproc
99 .LFE23:
101 .Letext0: