Re: Question: attribute 'naked'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cc: linux-sparse
On Tue, Aug 04, 2009 at 11:15:11PM +0100, Russell King - ARM Linux wrote:
> On Tue, Aug 04, 2009 at 06:03:22PM -0400, H Hartley Sweeten wrote:
> > When compiling the kernel with sparse, in arch/arm/mm/copypage-v4wb.c
> > I get the following error:
> > 
> > arch/arm/mm/copypage-v4wb.c:25:13: error: attribute 'naked': unknown attribute 
> 
> Sparse doesn't understand the naked attribute.  GCC does.
> 
> > /*
> >  * it doesn't make sense on ARM (currently the only user of __naked) to trace
> >  * naked functions because then mcount is called without stack and frame pointer
> >  * being set up and there is no chance to restore the lr register to the value
> >  * before mcount was called.
> >  */
> > #define __naked				__attribute__((naked)) notrace
> > 
> > Is this macro actually correct?  The compiler I am using is:
> 
> Yes - naked instructions can't be traced, because they tend to have
> entry/exit sequences which mcount won't understand.
> 
> -------------------------------------------------------------------
> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
> FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
> Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux