From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25715 invoked by alias); 30 May 2010 05:58:16 -0000 Received: (qmail 24402 invoked by uid 48); 30 May 2010 05:58:02 -0000 Date: Sun, 30 May 2010 05:58:00 -0000 Message-ID: <20100530055802.24401.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/44290] [4.5 Regression] __naked attribute is broken In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "raj dot khem at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg03253.txt.bz2 ------- 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