On 2005-02-15, BrownB <[EMAIL PROTECTED]> wrote: > Hello, I'm sorry to bother you with another question on this widely discussed > feature, > but I can't reach any progress and can't find any soultion path.. > > I'm using PRC-Tools. > > I was creating a library for my app, but I've reached the .text segment max > size and can't > move more functions to other segments. > > So I created a "plugin" application to be called from my main application: in > this way I > was starting with a "blank" .text section. I'm including some GC++ object > files I made > in the past in the link step. > > Now, I can't understand why I still get the overfill .text section error: > > m68k-palmos-g++.exe -o interpretation main.o MemUtils.o ht_ClassInterp.o > Ht_cmpl > x.o Ht_PqRsT.o interpretation_class_wrapper.o > interpretation_plugin_interface.o > segments.o segments.ld -lPalmOSGlue > /usr/m68k-palmos/bin/ld: region coderes is full (interpretation section .text) > /usr/m68k-palmos/lib/crt0.o(.text+0x50): In function `start': > crt0.c:64: relocation truncated to fit: DISP16 __do_bhook > /usr/m68k-palmos/lib/crt0.o(.text+0x5a):crt0.c:67: relocation truncated to > fit: > DISP16 __do_ctors > /usr/m68k-palmos/lib/crt0.o(.text+0x70):crt0.c:72: relocation truncated to > fit: > DISP16 __do_dtors > /usr/m68k-palmos/lib/crt0.o(.text+0x7a):crt0.c:74: relocation truncated to > fit: > DISP16 __do_ehook > /usr/m68k-palmos/lib/libcrt.a(hooks.o)(.text+0x16): In function `__do_bhook': > hooks.c:28: relocation truncated to fit: DISP16 start > /usr/m68k-palmos/lib/libcrt.a(hooks.o)(.text+0x64): In function `__do_ehook': > hooks.c:44: relocation truncated to fit: DISP16 start > /usr/m68k-palmos/lib/libcrt.a(hooks.o)(.text+0xa6): In function `__do_ctors': > hooks.c:60: relocation truncated to fit: DISP16 start > /usr/m68k-palmos/lib/libcrt.a(hooks.o)(.text+0xe0): In function `__do_dtors': > hooks.c:76: relocation truncated to fit: DISP16 start > /usr/m68k-palmos/lib/libcrt.a(multi_dreloc.o)(.text+0xe): In function > `_GccLoadC > odeAndRelocateData': > dreloc.c:56: relocation truncated to fit: DISP16 start > collect2: ld returned 1 exit status > make: *** [interpretation] Error 1 > < ... snip ...> > > You can see that the .text total sie is this: > > TOTAL TEXT SEGMENT SIZE: 0x3F34 = 16.180 > > So why this problem? I'm linking only PalmOSGlue.a. > > If anyone has any hint I'd appreciate it, thanks! > BrownB
You forget the size of the system library routines (both C++ and C) which push you over the limit. In the the linking phase use the linker trace option (m68k-palmos-g++.exe -Wl,-t -o ...) to get a list of object files including those from libraries as they are processed. You can also get a linker map using the -Wl,-M option. See the man pages of gcc, g++ and ld for more details. Note that the default linker script only allows 32K in the .text segment. You can use your own linekr script to got to 64K, but you have to be carefull with intrasegment jumps (still need to be less than 32K). HTH Ton van Overbeek -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
