]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Sun Feb 18 14:08:04 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
authorRoland McGrath <roland@gnu.org>
Mon, 19 Feb 1996 23:25:15 +0000 (23:25 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 19 Feb 1996 23:25:15 +0000 (23:25 +0000)
* csu/initfini.c (_init): Remove bogus volatile declarations and
extra variable, take the address of __gmon_start__ only implicitly
to avoid the test being optimized out.

ChangeLog
csu/initfini.c

index d828092e1b4201fe12dfd1f0c7981a0bdc790c23..bf4804557245180ee1dda9d8406d235e4ab58a39 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Feb 18 14:08:04 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * csu/initfini.c (_init): Remove bogus volatile declarations and
+       extra variable, take the address of __gmon_start__ only implicitly
+       to avoid the test being optimized out.
+
 Sun Feb 18 15:08:10 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * sysdeps/posix/utimes.c (__utimes): There are 1000000 usecs in a
index e1bf2b8284b277201899d370947ee1bc7d574ba0..a91c3de7a4035ee154d7c84803799d6d57fd02c5 100644 (file)
@@ -70,13 +70,10 @@ _init (void)
      gcrt1.o to reference a symbol which would be defined by some library
      module which has a constructor; but then user code's constructors
      would come first, and not be profiled.  */
-  extern volatile void __gmon_start__ (void) __attribute__ ((weak));
-  /* This volatile variable is necessary to avoid GCC optimizing
-     out the test.  */
-  register volatile void (*g) (void) = &__gmon_start__;
+  extern void __gmon_start__ (void) __attribute__ ((weak));
   weak_symbol (__gmon_start__)
-  if (g)
-    (*g) ();
+  if (__gmon_start__)
+    __gmon_start__ ();
 
   /* End the here document containing the .init prologue code.
      Then fetch the .section directive just written and append that