This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "R_ARM_GOTOFF32" problem on uClinux
- From: "Shaun Jackman" <sjackman at gmail dot com>
- To: "K.J. Kuan-Jau Lin(æåé)" <kjlin at faraday-tech dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 1 Dec 2008 09:49:11 -0800
- Subject: Re: "R_ARM_GOTOFF32" problem on uClinux
- References: <D8C133194F661446A81658535F98D5F91C9355@EX1.faraday.com.tw>
- Reply-to: "Shaun Jackman" <sjackman at gmail dot com>
2008/12/1 K.J. Kuan-Jau Lin(æåé) <kjlin@faraday-tech.com>:
> Hi Shaun,
>
> I have trouble in uClinux world.
> After long and painful debugging, i found it is due to the "R_ARM_GOTOFF32"
> relocation type.
> By google, i found you got the same problem before.
> (http://mailman.uclinux.org/pipermail/uclinux-dev/2006-June/039089.html).
> I knew you have tried the gcc-4.0.x & gcc-4.1.x toolchains.
> My toolchian is gcc-4.2.4 and seems still have the same problem.
> Besides changing to gcc-4.0.x, did you have any workaround solutions?
> Any hints will be very appreciated.
Hi KJ,
I never did find a solution. Only two cases in particular bit me:
* strings constants
* addresses of static functions passed as arguments
The first I worked around by placing strings constants in the
read-write memory (RODATA after the GOT) rather than the read-only
memory (RODATA after TEXT), although this does use RAM unnecessarily.
I never did fix the second issue.
A possible quick hack, although not a solution, would be to find
wherever GCC decides to emit a GOTOFF32 relocation and use a GOT32
relocation instead.
This issue has a bug report in bugzilla:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28194
I've cc'ed the GCC mailing list.
Cheers,
Shaun