CS Flashcards
Assembly vs. Machine Code
Machine code = binary codes understood by the CPU
Assembly is an abstraction language though it closely corresponds to CPU instructions
Elf vs. Binary file
Binary is pure binary file - no symbols, address relocations
etc..
Intended for loading at specific location in memory.
Elf is “Executable Linkable Format” and contains symbol lookups, relocatable table, memory sections like text, data, bss etc…
Can be dynamically loaded anywhere in memory.
http://www.skyfree.org/linux/references/ELF_Format.pdf
Linux binary utilities
xxd - handles hex and binary
hexdump - similar
objdump - display object file information
readelf - show all symbol information etc.. about elf
strings - show all ascii strings in a file
size - shows text, data, bss, dec, hex sizes
Anatomy of a program in memory
http://duartes.org/gustavo/blog/post/anatomy-of-a-program-in-memory/
C program memory layout
http://www.geeksforgeeks.org/memory-layout-of-c-program/