ADC Home > Reference Library > Technical Q&As > Legacy Documents > Mac OS 9 & Earlier >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation. |
|
Q: I'm trying to write a 4D external (stand-alone code) which will be larger than 32K. When I compile my C code with model -far, the linker tells me:
Q: Is there an example showing a MPW generated >32K standalone code resource? A: Model far works by patching parts of the segment loading mechanism, changing the structure of jump table entries, and storing segment relocation information for the generation of absolute addresses. This only applies to applications, however, which is why the Linker is generating an error. The restriction in creating >32K CODE resources is only because of
limitations with intra-segment branching. Depending on the compiler options you
use, this can be worked around. For example, the MPW C compiler has the Another option you can use with the MPW Linker is To find out more about both options, we suggest looking through the MPW Command Reference under C and Linker. In addition, check out the Runtime Architecture chapter in "Building Programs with MPW," available with MPW. Unfortunately, there aren't any samples showing how these samples are used, but it should be just a matter of adding options to your MakeFile. |
|