This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix the glibc profiling issue on arm-unknown-linux-gnueabi.


On Wed, 19 Jan 2011, Manjunath Matti wrote:

>  /* If compiled for profiling, call `mcount' at the start of each function.  */
>  #ifdef PROF
> +#if __GNUC_PREREQ(4,4)

I think the condition should also include defined(__ARM_EABI__), since 
this is specific to EABI, though old-ABI is no longer maintained.

> +#define CALL_MCOUNT                     \
> +        str     lr,[sp, #-4]!   ;       \
> +        bl      PLTJMP(mcount)  ;
> +#else
>  #define CALL_MCOUNT                    \
>         str     lr,[sp, #-4]!   ;       \
>         bl      PLTJMP(mcount)  ;       \
>         ldr     lr, [sp], #4    ;
> +#endif

This patch does not appear to be against the current git sources, which 
contain CFI information for the call.  Note that you need to be careful 
about CFI information for a call to __gnu_mcount_nc (which acts like a pop 
instruction); see GCC bug 42380 for more discussion of that issue.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]