From “Hacking: The art of exploitation.”
- the compiled code goes into the text segment,
- while the variables reside in the remaining segments.
- If static or global variables are initialized with data, they are stored in the data memory segment;
- otherwise, these variables are put in the bss memory segment.