|
|||||||||||
|
Technical Support On-Line Manuals BL51 User's Guide |
BL51 User's GuideTheory of OperationThe system the linker uses to determine which function arguments (or parameters) and variables may be overlaid is quite sophisticated. It begins when the compiler generates the object code for a function. The compiler stores all function parameters and local variables in overlayable bit, data, pdata, or xdata segments. The segment names generated by the compiler for Parameters and Local Variables are well-defined. They are used by the compiler to access parameters and local variables. As the linker resolves references between functions, it builds a call tree based on where those references appear. For instance, if function_a calls function_b, the compiler inserts a reference to function_b in the object code generated for function_a. When the linker resolves this reference, it inserts the address of function_b and adds a call from function_a to function_b in the call tree. The local variables and parameters of function_a are overlaid with the variables and parameters of function_b only under the following conditions:
| ||||||||||
|
|||||||||||