Rick Reynolds <[EMAIL PROTECTED]> wrote: > > I've been using multilink to build up my app, and it has been working well > up to now. However, since debugging multilink'd apps in pose has problems, > I'm now trying to make the switch over to the gcc segmenting scheme. > > I have declared 7 code segments for my app. I have made the proper entries > in a .def file. I am using macros to declare the segments on the prototypes > for my functions. I have used -Wall to find all the functions that are > being used without a proper prototype and have fixed all of those. So I > believe that I'm building my app into specific code segments. I get the > following output at link time: > > /usr/m68k-palmos/bin/ld: region coderes is full (myapp section .text) > > /usr/m68k-palmos/lib/crt0.o: In function `start': > crt0.c:62: relocation truncated to fit: DISP16 _GccRelocateData > crt0.c:64: relocation truncated to fit: DISP16 __do_bhook > crt0.c:67: relocation truncated to fit: DISP16 __do_ctors > crt0.c:72: relocation truncated to fit: DISP16 __do_dtors > crt0.c:74: relocation truncated to fit: DISP16 __do_ehook > /usr/m68k-palmos/lib/libcrt.a(hooks.o)(.text+0x16):hooks.c: relocation > truncated to fit: DISP16 start > /usr/m68k-palmos/lib/libcrt.a(hooks.o)(.text+0x64):hooks.c: relocation > truncated to fit: DISP16 start > /usr/m68k-palmos/lib/libcrt.a(hooks.o)(.text+0xa6):hooks.c: relocation > truncated to fit: DISP16 start > /usr/m68k-palmos/lib/libcrt.a(hooks.o)(.text+0xe0):hooks.c: relocation > truncated to fit: DISP16 start > /usr/m68k-palmos/lib/libcrt.a(multi_dreloc.o)(.text+0xe):dreloc.c: > relocation truncated to fit: DISP16 start > collect2: ld returned 1 exit status > make: *** [myapp] Error 1 > All the references mentioned above are in the startup code which is at the beginning of the .text segment. The actual routines (GccRelocateData, etc.) are pulled in from libcrt.a which is at the end, after all your own object files. The distance from crt0.o to the library routines is larger than 32767 (signed 16-bit offset) hence the errormessages. So my guess is that you are just over the limit for the .text segment. Best thing to do is to move one or more routines to one of your other segments or to a new segment. (unless you want to force those routines from libcrt.a to somewhere in the middle of the .text segment ....)
Ton van Overbeek -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
