CS Flashcards

1
Q

Assembly vs. Machine Code

A

Machine code = binary codes understood by the CPU

Assembly is an abstraction language though it closely corresponds to CPU instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Elf vs. Binary file

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Linux binary utilities

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Anatomy of a program in memory

A

http://duartes.org/gustavo/blog/post/anatomy-of-a-program-in-memory/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

C program memory layout

A

http://www.geeksforgeeks.org/memory-layout-of-c-program/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly