Craig Allan Jeffree wrote:

> Hello everyone,
>     I'm trying to compile some virtual driver code but I'm having
> trouble getting it to build the prc.  After I compile the c file which
> contains a bunch of functions I link the code telling the linker the
> name of my entry point function.  This function is the first function
> defined in the code.  After that I run the build-prc tool on the linked
> code and it exits with an error of "entry point too distant".  It
> reports the entry point to be 0x1000000 or just above depending on
> exactly what the code is.  In the source code for build-prc it reports
> this error if the entry point is beyond 32767 bytes.  How do I force the
> linker to place the entry point at a lower address, or how do I convince
> build-prc to accept this address.
>
>     I'm using the PRC Tools and developing under linux for PalmOS 3.5
>
> Thanks for your help
>
> Craig

I found an answer:
        m68k-palmos-objcopy -O binary -R .data -R .bss compiledCode code0000.bin

The output file name (code0000.bin) needs that number in it to force it into being a 
code resource with an id of 0.

Then build-prc can be run win code0000.bin as an input.  Also the entry point function 
can't have any string literals in them
because they will usually be placed before the function.  So the entry point funciton 
will have to call another function which
contains strings if they are required.

Craig

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


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

Reply via email to