This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [uClinux-dev] XIP on an ARM processor (R_ARM_GOTOFF32)
- From: "Shaun Jackman" <sjackman at gmail dot com>
- To: "uClinux development list" <uclinux-dev at uclinux dot org>, gcc at gcc dot gnu dot org
- Date: Tue, 27 Jun 2006 12:16:43 -0600
- Subject: Re: [uClinux-dev] XIP on an ARM processor (R_ARM_GOTOFF32)
- References: <7f45d9390606271003q335d9be1l6a4100ddfcaeef88@mail.gmail.com> <1151429653.7196.21.camel@justakiss>
- Reply-to: "Shaun Jackman" <sjackman at gmail dot com>
On 6/27/06, Erwin Authried <eauth@softsys.co.at> wrote:
Hi,
which compiler/binutil version did you use? Could you post the source
that you used?
One other thing (although that doesn't seem to have to do with your
problem): It is important that you use -fpic (not -fPIC) so that the
correct multilib library is used. For the same reason, -fpic must be
specified in CFLAGS as well as in LDFLAGS if you use a Makefile.
Regards,
Erwin
Hello Erwin,
The source is simply...
int main() { puts("Hello, world!"); return 0; }
I'm using binutils 2.17 and gcc 4.1.1.
The issue-raising difference is that I attempted to place .rodata
after the .text semgent in flash, rather than with the .data segment
in RAM. This should work, except that GCC is creating GOT-relative
references to the symbols in .rodata rather than PC-relative
references. The GOT-relative reference does not work if the .rodata
symbol is with the .text segment instead of with the .data segment.
Cheers,
Shaun