On 2004-10-21, Ben Combee <[EMAIL PROTECTED]> wrote:
> At 09:57 AM 10/21/2004, you wrote:
>>There is some very good information in here!  Thanks for the pointer.  I 
>>tried compiling with the -T text_64k sample file I got he following error: 
>>undefined reference to '_text_'[gdbstub.c].
>>
>>I then tried just a hello world app with the same -T option and got the 
>>same result.  So my question is now, beyond additional cose optimizations 
>>(and those are great ideas in the article) how does one build a linker 
>>script to get rid of the coderes full error?
>
> AFAIK, there's a problem with the test_64k script and the changes made to 
> PRC-Tools to support multiple-section debugging.  However, you shouldn't 
> need to use text_64k if you've properly sectioned your code, although it 
> might be required if you've got a large enough section of code that has to 
> be in place during non-global launch codes.
>
>
> -- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc.
>     "Combee on Palm OS" weblog: http://palmos.combee.net/
>     Developer Fourm Archives:   http://news.palmos.com/read/all_forums/

If you want to use the text_64k script, here is a fix:
In the text_64k file (normally installed in /usr/m68k-palmos/lib/text_64k)
you need to add one line to the .bss definition:
Original version:
----------------------------
    .bss :
    {
        bss_start = .;
        *(.bss)
        *(COMMON)
    } > datares
----------------------------
Changed version:
----------------------------
    .bss :
    {
        bss_start = .;
        PROVIDE(__text__ = .);
        *(.bss)
        *(COMMON)
    } > datares
----------------------------

That should get rid of your linker error.
I will include this in the next version of my patches.
Thanks (indirectly) for the bug report.

By the way, same change is needed for 
/usr/m68k-palmos/lib/text_64k_palmos3

Ton van Overbeek

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to