$ cat hello.c #include "stdio.h" void main(void) { printf("Hello world!\n"); } $ gcc -o hello hello.c -g -Wa,-anlhd=hello.lst,-L $ cat hello.lst 1 .file "hello.c" 2 .text 3 .Ltext0: 4 .section .rodata 5 .LC0: 6 0000 48656C6C .string "Hello world!" 6 6F20776F 6 726C6421 6 00 7 .text 8 .globl main 10 main: 11 .LFB0: 12 .file 1 "hello.c" 1:hello.c **** 2:hello.c **** #include "stdio.h" 3:hello.c **** 4:hello.c **** void main(void) { 13 .loc 1 4 17 14 .cfi_startproc 15 0000 55 pushq %rbp 16 .cfi_def_cfa_offset 16 17 .cfi_offset 6, -16 18 0001 4889E5 movq %rsp, %rbp 19 .cfi_def_cfa_register 6 5:hello.c **** printf("Hello world!\n"); 20 .loc 1 5 2 21 0004 488D3D00 leaq .LC0(%rip), %rdi 21 000000 22 000b E8000000 call puts@PLT 22 00 6:hello.c **** } 23 .loc 1 6 1 24 0010 90 nop 25 0011 5D popq %rbp 26 .cfi_def_cfa 7, 8 27 0012 C3 ret 28 .cfi_endproc 29 .LFE0: 31 .Letext0: $ ia16-elf-gcc -o hello.com hello.c -g -Wa,-anlhd=hello.lst,-L cc1: warning: target system does not support debug output $ cat hello.lst 1 .arch i8086,jumps 2 .code16 3 .att_syntax prefix 4 #NO_APP 5 .section .rodata 6 .LC0: 7 0000 48656C6C .string "Hello world!" 7 6F20776F 7 726C6421 7 00 8 .text 9 .global main 11 main: 12 0000 55 pushw %bp 13 0001 89E5 movw %sp, %bp 14 0003 B80000 movw $.LC0, %ax 15 0006 50 pushw %ax 16 0007 16 pushw %ss 17 0008 1F popw %ds 18 0009 E8FEFF call puts 19 000c 83C402 addw $2, %sp 20 000f 90 nop 21 0010 5D popw %bp 22 0011 16 pushw %ss 23 0012 1F popw %ds 24 0013 C3 ret 26 .ident "GCC: (GNU) 6.3.0" $