SPRAB89A September 2011 – March 2014
Interoperability between toolchains requires that addressing generated by one is consistent with placement generated by another, especially with respect to near DP-relative addressing. Any variable addressed with near DP-relative addressing must be allocated in a section that is placed within 32 KB of the DP.
This requires the ABI to establish some conventions. Some of these conventions depend on toolchain-specific behavior, such as code generation models supported, or even user behavior, such as command line options selected or language extensions applied. For this reason, the ABI takes a two-pronged approach:
The toolchain generating the addressing may only have visibility to a variable's declaration and not its definition. Therefore, the conventions must be based only on information available at both points. This excludes, for example, the use of array dimensions.