This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug target/44290] [4.5 Regression] __naked attribute is broken



------- Comment #19 from raj dot khem at gmail dot com  2010-05-30 05:58 -------
(In reply to comment #18)
> Created an attachment (id=20773)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20773&action=view) [edit]
> linux kernel workaround for attribute naked breakage
> 
> This patch makes the Linux kernel add noinline and noclone attributes to
> functions declared __naked.  This allows gcc-4.5 to build a working 2.6.34
> Linux kernel for my mach-iop32x/n2100 ARM box.
> 
> Khem: can you check if this kernel-side workaround fixes your problem?

I have tried using __noclone__ a couple of days ago to workaround the problem
//static void __attribute__((__naked__, __noinline__, __noclone__,
__no_instrument_function__))

static void __attribute__((__naked__, __no_instrument_function__))
v4wb_copy_user_page(void *kto, const void *kfrom)

But my gcc seems to ignore it and its generating same code for both with Os and
O2 for both
above cases. Hence did not solve my issue.
I am using snapshot of 4.5 branch from May 20

> 
> Eventually I'd like the kernel to not use __naked, but that is non-trivial. 
> This fix should work now and be easily backportable to older kernels.
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44290


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