On Wed, Jun 28, 2006 at 11:20:00AM -0600, Shaun Jackman wrote: > Hello Richard, Dan, > > I'm trying to track down which part of the GCC source tree makes the > decision to emit either a R_ARM_GOT32 or a R_ARM_GOTOFF32 relocation. > A new feature in GCC 4.1 emits a R_ARM_GOTOFF32 relocation for a > reference to a static function. I thought there was a good chance one > of you two might have added this feature. If you're familiar with the > the patch, would you please point me to the relevant ChangeLog entry? > I'm hoping to add an exception for execute in place (XIP) code (-fPIC > -msingle-pic-base) to use R_ARM_GOT32 instead of R_ARM_GOTOFF32.
GOTOFF support has been there for a long while. Only use of it for static functions is recent. It should be easy to find. But this is not at all the only problem. GCC's PIC model assumes a fixed displacement between segments. We've implemented something similar to what you need for VxWorks. A couple of other places had to be changed. I don't remember if the VxWorks gcc port was submitted, or just the binutils bits. -- Daniel Jacobowitz CodeSourcery