ARM/THUMB long calls stubs
Richard Earnshaw
rearnsha@arm.com
Sat Aug 7 10:05:00 GMT 2004
On Sat, 2004-08-07 at 10:04, Sami Kantoluoto wrote:
> Hi Nick,
>
> On Fri, Aug 06, 2004 at 01:53:20PM +0300, Sami Kantoluoto wrote:
> >
> > On Fri, Aug 06, 2004 at 11:25:04AM +0100, Nick Clifton wrote:
> >
> > > The way to avoid this "feature" (I hesitate to call it a bug) is to
> > > compile your code with the "-ffunction-sections" switch added to the GCC
> > > command line. This tells GCC to place each function into its own
> > > separate section, and GCC is smart enough to know that different
> > > sections may not end up close to each other, so it cannot optimise away
> > > the use of the long call.
> >
> > This helped, thanks! (But I still think that __attribute__ ((section(x)))
> > should be enough ;-)
>
> Would it be hard to fix this? So that gcc would take __attribute__
> ((section())) in account when determining if functions are in different
> sections or not. Feels bad as all functions are called with the long call..
>
> PS. thanks for your help (it's being very nice that someone really
> responds)!
>
>
> -sk
I think it's a waste of time trying to fix this in this way. We should
be fixing the linker so that it can automatically insert long-call
veneers where they are needed. This is required in any case for EABI
conformance.
R.
More information about the Gcc-bugs
mailing list