Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Mac OS Runtime Architectures /
Chapter 10 - Classic 68K Runtime Architecture / Bypassing MC68000 Addressing Limitations


Increasing Segment Size

There are two methods for increasing segment size:

Note
If the program you are writing is intended to run on a 68020 or higher CPU, you can use the -br 020 option. This reduces code size and improves execution speed.
Creating branch islands solves intrasegment reference problems, but is not a complete solution in the case where a routine located beyond the 32 KB limit is externally referenced. Figure 10-7 shows two segments, one of which is larger than 32 KB.

Figure 10-7 Branch islands and intersegment references

As you can see, the only reference that cannot be resolved is that to procedure B if it is made through the jump table. The ILink tool automatically tries to place externally referenced routines in the first 32 KB of a segment, but if this is not possible, it generates a linker error. In such cases, you should resegment your code or build your program with the -model far (32-bit everything) option.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 MARCH 1997