So I’m on an ARM system (an iPod touch, to be specific) and I’d like to understand a little about how my program actually assembles. I’ve figured out how to use gdb to print and step assembler instructions, but I’ve read that ARM supports overlays for large programs. Is there a way to somehow list the places in the executable file itself where these overlays are located, if they even exist? Do I need a special gcc flag to include the overlays, or is there a way to disable them for ease of debugging?
Thanks for the help.
We have here a classical example of XY problem but I’ll try to answer it anyway.
Overlays are not something inherent in ARM, it’s a generic technique for running programs which are larger than available memory (or reducing memory usage). It can be implemented in ARM, x86 or almost any other platform.
However, you should not worry about it. iOS and Linux do not use overlays, they use MMU and virtual memory to manage running programs. To you as a programmer it’s transparent, the OS takes care of mapping and unmapping code or data pages as necessary.
If you do have specific issues when debugging, you should mention them; asking hypothetical questions about what you think is the reason is generally not very productive.