© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
D. VostokovFoundations of ARM64 Linux Debugging, Disassembling, and Reversinghttps://doi.org/10.1007/978-1-4842-9082-8_10

10. Frame Pointer and Local Variables

Dmitry Vostokov1  
(1)
Dublin, Ireland
 

Stack Usage

In addition to storage for return addresses, a stack is used to pass additional parameters to functions (if you have more than eight parameters) and store local variables. The stack is also used to save and restore values held in registers when we want to preserve them during some computation or across function calls. For example, suppose we want to call some function, but at the same time, we have valuable data in registers X0 and X1. The function code ...

Get Foundations of ARM64 Linux Debugging, Disassembling, and Reversing: Analyze Code, Understand Stack Memory Usage, and Reconstruct Original C/C++ Code with ARM64 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.