C code:
struct person { int age; int no; }; int plus_one(int no) { return no + 1; } int minus_one(int no) { return no - 1; }
Run 'gcc -S -ffunction-sections -fdata-sections' produce:
.file "sec.c" .section .text.plus_one,"ax",@progbits .globl plus_one .type plus_one, @function plus_one: pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax addl $1, %eax popl %ebp ret .size plus_one, .-plus_one .section .text.minus_one,"ax",@progbits .globl minus_one .type minus_one, @function minus_one: pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax subl $1, %eax popl %ebp ret .size minus_one, .-minus_one .ident "GCC: (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3" .section .note.GNU-stack,"",@progbits