Professional Documents
Culture Documents
CSCI 2400 - Exam 4
CSCI 2400 - Exam 4
- Text comes first, then data, then bss. Order of symbols within these sections will match the order of files in compilation command
- Local variables do not appear in the symbol table or object file (unless static)
- Multiple strong symbols of the same name are not allowed
- Strong symbols override weak with same name, i.e uninitialized var “int x” will be overwritten by “int x=345” in a diff file and be given value 345
- Weak symbols are resolved with first identified matching strong symbol. If no strong symbol, linker picks and keeps an arbitrary weak symbol.
Signals
- SIGCHLD: Child process has stopped or terminated
- SIGINT: Interrupt from keyboard (ctrl+c)
- SIGTSTP: Stop until next SIGCONT (ctrl+z)
- SIGUSR1: Terminate (by default), but more commonly is a “user-defined signal”
Garbage Collection:
- Mark&Sweep: Conservative implementation treats all pointer like objects as ptrs | Collection algorithm: Part 1 - Mark all reachable pointers from
a root node (stack ptr), Part 2 - Delete all unreachable memory location