Optimizing Embedded Linux
by Todd Fischer

Example 1: 
(a)
$ du -hs fs
    3.8M fs

(b) 
$ mkcramfs fs fs.crm
$ ls -la fs.crm
-rw-r--r--    1 stevej   users     1732608 Oct  2 12:49 fs.crm

Example 2:
(a) 
void main( void ) { }

(b)
$ arm-linux-objdump -T a.out
a.out:     file format elf32-littlearm
DYNAMIC SYMBOL TABLE:
02000230      DF *UND*  00000220  GLIBC_2.0   abort
02000240      DF *UND*  00000198  GLIBC_2.0   __libc_start_main
02000380 g    DO .rodata    00000004  Base        _IO_stdin_used

Example 3:

$ arm-linux-nm --size-sort vmlinux | grep -v 00000 | grep " [bBdD] "
00001000 B con_buf
00001000 B pidhash
00001000 b pty_state
00001000 b swap_buffer
00001578 B kstat
00001648 D contig_page_data
00001fe0 b ro_bits
00002000 D init_task_union
00004000 b log_buf
000043f0 B fb_display
00008780 B blk_dev

Example 4: 

$cat /proc/slabinfo
slabinfo - version: 1.1
kmem_cache            57     78    100    2    2    1
blkdev_requests      512    520     96   13   13    1
tcp_bind_bucket        3    113     32    1    1    1
ip_fib_hash            5    113     32    1    1    1
skbuff_head_cache      1     24    160    1    1    1
sock                   8     10    800    2    2    1
inode_cache          163    170    384   17   17    1
bdev_cache             4     59     64    1    1    1
sigqueue               0     29    132    0    1    1
dentry_cache         226    240    128    8    8    1
filp                  48     80     96    2    2    1
names_cache            0      2   4096    0    2    1
buffer_head         8324   8360     96  209  209    1
mm_struct              6     24    160    1    1    1
vm_area_struct       126    177     64    3    3    1
fs_cache               5     59     64    1    1    1
files_cache            5      9    416    1    1    1
signal_act             6      9   1312    2    3    1



1

