Thread (8 messages) flat view 8 messages, 6 authors, 8h ago

Re: [PATCH] tools: Use fputc() calls in some functions

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-07-23 14:34:06
Also in: bpf, kernel-janitors, kvm, linux-acpi, linux-gpio, linux-kselftest, linux-mm, linux-perf-users, linux-pm, linux-trace-kernel, lkml, mptcp, netdev, platform-driver-x86, virtualization

On Thu, 23 Jul 2026 06:47:00 -0700
Andi Kleen [off-list ref] wrote:
quoted
The source code was transformed by using the Coccinelle software.  
gcc already does this transformation automatically.
Yep, I showed this in my talk[1] that looked at what printf("Hello World!")
does. Doing an objdump of:

#include <stdio.h>

int main(void) {
	printf("Hello World!\n");
	return 0;
}

has:

0000000000001139 <main>:
    1139:       55                      push   %rbp
    113a:       48 89 e5                mov    %rsp,%rbp
    113d:       48 8d 05 c0 0e 00 00    lea    0xec0(%rip),%rax        # 2004 <_IO_stdin_used+0x4>
    1144:       48 89 c7                mov    %rax,%rdi
    1147:       e8 e4 fe ff ff          call   1030 <puts@plt>  <<<--- puts and not printf
    114c:       b8 00 00 00 00          mov    $0x0,%eax
    1151:       5d                      pop    %rbp
    1152:       c3                      ret

-- Steve

[1] https://www.youtube.com/watch?v=JRyrhsx-L5Y
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help