This is the mail archive of the
mailing list for the GCC project.
Re: [uClinux-dev] Re: XIP on an ARM processor (R_ARM_GOTOFF32)
Jivin Shaun Jackman lays it down ...
> On 6/27/06, Shaun Jackman <email@example.com> wrote:
> >I'm attempting to build an XIP "Hello, world!" application for the ARM
> >processor. I'm compiling with -fPIC -msingle-pic-base with the default
> >-mpic-register=r10. The layout of the memory map is such that the
> >.text and .rodata are in flash memory, and the .got, .data and so
> >forth are loaded into RAM. r10 is loaded with the address of the .got.
> A workaround is to place the .rodata section after the .got with the
> .data section rather than with the .text data. This work-around loses
> the advantage of keeping the read-only data in flash, instead of
> copying it to RAM.
Are you using the ld-elf2flt/elf2flt.ld combo ?
It lays things out in a known way and has a '-move-rodata' option which
will put the rodata in with the .text if it contains no relocation info
needed at runtime.
Something like this on the link line:
XXXX-gcc .... -Wl,-move-rodata ....
The uClinux-dist has this as the default for !MMU systems that can do
David McCullough, firstname.lastname@example.org, Ph:+61 734352815
Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com