I think part of my problem is that the pointer I have actually does NOT point
to the code I want to execute, and may, in some cases, be trying to
execute data.

I looked in my code resources that were generated and they have strings
I use for debugging showing up at the top of the code resource, and the
actual code doesn't show up until later.  I assume this means that my
.data is getting put before my .text

its actually your .rodata section :)

The most convenient solution would be to make the code always be at
offset 0, and the data be down below the code.

yes, that is the solution.

There must be some way to write a custom linker script that can put my
.data after my .text, but I don't really know how to accomplish this,
and my reading of how to write linker scripts just left me confused.

man ld

SECTIONS
{
 .text 0x00000000 : { *(.text) *(.rodata)  }
}

there are are bunch of sample scripts in the prc-tools sdk folders.
you may want to do:

 m68k-palmos-objdump -D file.o

so you can see the sections that are actually defined within your object file.

Any help would be appreciated.

you are using prc-tools right? forget this if your using codewarrior :)

--
// Aaron Ardiri

--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to