"Sean L. Gilley" wrote:
>
> I think I must have a base misunderstanding of how to do a multi-segment app
> in (Linux) gcc.
>
> I have an app with a prc size of 65402 characters and has two segments.
>
> I'm trying to add a function call, and I'm getting the following error:
>
> -mycroft-> make
> m68k-palmos-gcc -static -g -O3 -I/usr/palm/m68k-palmos-coff/include/PalmOS
>-I/usr/palm/m68k-palmos-coff/include
>-I/usr/palm/m68k-palmos-coff/include/PalmOS/System
>-I/usr/palm/m68k-palmos-coff/include/PalmOS/Hardware
>-I/usr/palm/m68k-palmos-coff/include/PalmOS/UI -c app.c -o app.o
> /tmp/ccicGGCR.s: Assembler messages:
> /tmp/ccicGGCR.s:27940: Error: Value of -33508 too large for field of 2 bytes at
>0x726c
> /tmp/ccicGGCR.s:27940: Error: value out of range
Sounds like you might need more than two segments, or you might be able
to fix this by reordering the modules on your link line. The jump limit
within a segment is 32K, which is smaller than the 33508 value the
linker has computed for the jump to your new function. Between
segments, there is no effective limit.
Either call between segments or rearrange your modules within a segment
so the caller and the callee are closer together. The latter has
problems because it can cause other jumps to become out of range, so you
can only carry that solution so far before you have to add segments.
--
= Warren Young -- Maintainer of the Palm OS Programmer's FAQ at:
= http://www.cyberport.com/~tangent/palm/faq/
=
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/