lkml.org 
[lkml]   [2008]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: huge gcc 4.1.{0,1} __weak problem


On Thu, 1 May 2008, Venki Pallipadi wrote:
>
> __weak function with single return statement, did not get inlined when called
> from say

Is it always about inlining? If so, can't we add a __noinline__ to the
declaration of __weak?

Something like this oneliner?

Linus

---
include/linux/compiler-gcc.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 5c8351b..4061fc7 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -41,7 +41,7 @@

#define __deprecated __attribute__((deprecated))
#define __packed __attribute__((packed))
-#define __weak __attribute__((weak))
+#define __weak __attribute__((weak)) noinline
#define __naked __attribute__((naked))
#define __noreturn __attribute__((noreturn))


\
 
 \ /
  Last update: 2008-05-02 02:39    [W:0.062 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site