patches/glibc/ports-2.13/230-no-inline-gmon.patch
changeset 2438 2ba5655f6297
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/ports-2.13/230-no-inline-gmon.patch	Tue May 03 00:19:56 2011 +0200
     1.3 @@ -0,0 +1,36 @@
     1.4 +http://bugs.gentoo.org/196245
     1.5 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html
     1.6 +
     1.7 +Attached is a patch to add __attribute__ ((noinline)) to
     1.8 +call_gmon_start.
     1.9 +
    1.10 +Without this patch, the sec script that processed initfini.s removes a
    1.11 +part of inlined call_gmon_start, causing undefined label errors.
    1.12 +
    1.13 +This patch solves the problem by forcing gcc not to inline
    1.14 +call_gmon_start with __attribute__ ((noinline)).
    1.15 +
    1.16 +Tested by building for arm-none-lixux-gnueabi.  OK to apply?
    1.17 +
    1.18 +Kazu Hirata
    1.19 +
    1.20 +2006-05-07  Kazu Hirata  <kazu@codesourcery.com>
    1.21 +
    1.22 +	* sysdeps/generic/initfini.c (call_gmon_start): Add
    1.23 +	__attribute__ ((noinline)).
    1.24 +
    1.25 +Index: sysdeps/generic/initfini.c
    1.26 +===================================================================
    1.27 +
    1.28 +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c
    1.29 +--- glibc-2.13.orig/sysdeps/generic/initfini.c	2007-06-17 20:02:40.000000000 +0200
    1.30 ++++ glibc-2.13/sysdeps/generic/initfini.c	2009-11-13 00:50:09.000000000 +0100
    1.31 +@@ -70,7 +70,7 @@
    1.32 + /* The beginning of _init:  */
    1.33 + asm ("\n/*@_init_PROLOG_BEGINS*/");
    1.34 + 
    1.35 +-static void
    1.36 ++static void __attribute__ ((noinline))
    1.37 + call_gmon_start(void)
    1.38 + {
    1.39 +   extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/