>> It is complaining about my .text segment being too large. How can I
>> get around this?
>
> Make it smaller.
Of course! How simple! :)
>> int foo(int bar) SEGMENT1;
>>
>> ...
>>
>> int SEGMENT1 foo(int bar) {
>> ...
>> }
>>
>> I read on the Falch site that this was basically a no-no and that
>> best practices indicate to only place the segment definition on the
>> prototype.
>
> If the declaration is visible from the definition, then the second
> annotation is redundant. Redundancy of course leads to inconsistency
> and thence to bugs, which is why I would recommend against it.
Actually, I'm using a pre-compilation script that I've written in Perl to
place the segment names. Since I'm not running the risk of inconsistency,
is it OK to have the definition in both places? Is the redundancy harmless
from the compiler's & linker's points of view?
> That visibility can be checked with -Wmissing-declarations (although
> I personally find that flavour a little restrictive), which is not
> implied by -Wall.
Thanks. I think that's going to show the problem. I'm just realizing that
there are places in my code where no prototype exists, but the function is
defined before any other references. -Wall isn't catching that case, and
I'm sure that's loading lots of extra functions into the first segment.
Rick
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/