This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ARM/THUMB long calls stubs
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