about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-02 01:19:56 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-02 01:19:56 +0000
commit6c021fdc2f9defa902ae6e74a8ee44c402acf421 (patch)
treea0c5a94cc283943f512f9643c277adcbfc3c7f8a
parent68979757bc2813c52f751a1e7fbc784567798b31 (diff)
downloadglibc-6c021fdc2f9defa902ae6e74a8ee44c402acf421.tar.gz
glibc-6c021fdc2f9defa902ae6e74a8ee44c402acf421.tar.xz
glibc-6c021fdc2f9defa902ae6e74a8ee44c402acf421.zip
Update.
	* sysdeps/generic/initfini.c (_init): One less relocation.  Don't
	have extra call to __gmon_start__, use the pointer we already have.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/generic/initfini.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d24f09dec..4100b0ceba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-06-01  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/generic/initfini.c (_init): One less relocation.  Don't
+	have extra call to __gmon_start__, use the pointer we already have.
+
 	* elf/elf.h (ELF64_R_INFO): Cast sym value to Elf64_Xword before
 	shifting.
 
diff --git a/sysdeps/generic/initfini.c b/sysdeps/generic/initfini.c
index c68a5cff00..72f8c08574 100644
--- a/sysdeps/generic/initfini.c
+++ b/sysdeps/generic/initfini.c
@@ -1,5 +1,5 @@
 /* Special .init and .fini section support.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it
@@ -72,12 +72,13 @@ _init (void)
      module which has a constructor; but then user code's constructors
      would come first, and not be profiled.  */
   extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
-
 #ifndef WEAK_GMON_START
   __gmon_start__ ();
 #else
-  if (__gmon_start__)
-    __gmon_start__ ();
+  void (*gmon_start) (void) = __gmon_start__;
+
+  if (gmon_start)
+    gmon_start ();
 #endif
 
   asm ("ALIGN");