On Thu, 21 Aug 2003, Khaki Wizard <[EMAIL PROTECTED]> wrote: > /usr/m68k-palmos/bin/ld: region datares is full > (xxxxxx section .bss) [...] > Why is .bss full?
It is the datares region that is full, and this fact has been detected when an item in .bss was pushed out past the limit. But these facts do not necessarily imply that .bss is full. The datares region consists of .data (initialised data) followed by .bss (uninitialised data). It is more likely that .data is too large. This might just have happened behind your back; for example, the reasoning behind the suggestion to "drop C++" can be found at http://prc-tools.sourceforge.net/faq/ (dropping C++ entirely would be an overreaction to the problem). If it is in fact .bss that is too large, the solution is very simple. Your code contains an uninitialised global array: int my_huge_global_variable[10000]; You need to change it to be dynamically allocated instead: int *my_huge_global_variable; ... my_huge_global_variable = MemPtrNew (10000 * sizeof (int)); ... MemPtrFree (my_huge_global_variable); You don't even have to change any of the code that accesses it. > Is it because there is too many > reloc entries. As I know, they should be in .data > section. On m68k Palm OS, the only relocations that are of interest after linking are those in the .data section. Starting with version 2.0, prc-tools stores them after linking in a format that takes up a constant (and in fact trivial) amount of space regardless of the number of relocations. So no, there are not too many relocs. John -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
