]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 8 Sep 1998 23:27:46 +0000 (23:27 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 8 Sep 1998 23:27:46 +0000 (23:27 +0000)
* csu/initfini.c: Don't define __gmon_start__ if WEAK_GMON_START is
defined.
* sysdeps/unix/sysv/linux/i386/Makefile [subdir==csu]: Add
-DWEAK_GMON_START to CFLAGS-initfini.s.

ChangeLog
csu/initfini.c
sysdeps/unix/sysv/linux/i386/Makefile

index 05dc7111cf18700c60dd1b9dadd25fa997ca3c9e..361f8cf146403a30be779bb983b01e759237d7b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 1998-09-08  Ulrich Drepper  <drepper@cygnus.com>
 
+       * csu/initfini.c: Don't define __gmon_start__ if WEAK_GMON_START is
+       defined.
+       * sysdeps/unix/sysv/linux/i386/Makefile [subdir==csu]: Add
+       -DWEAK_GMON_START to CFLAGS-initfini.s.
+
        * elf/dl-object.c (_dl_new_object): Store map address in
        _dl_loaded if _dl_loaded is NULL.
        * elf/rtld.c (dl_main): Don't update _dl_loaded here.
index 1f74f203a30acc9e8f058acd8cc37725384e5952..c68a5cff006d71a83100bb2c6bf47393e2c369a0 100644 (file)
@@ -73,7 +73,12 @@ _init (void)
      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__ ();
+#endif
 
   asm ("ALIGN");
   asm("END_INIT");
@@ -83,6 +88,7 @@ _init (void)
   SECTION(".init");
 }
 asm ("END_INIT");
+#ifndef WEAK_GMON_START
 SECTION(".text");
 
 /* This version of __gmon_start__ is used if no other is found.  By providing
@@ -94,6 +100,7 @@ __gmon_start__ (void)
 {
   /* do nothing */
 }
+#endif
 
 /* End of the _init epilog, beginning of the _fini prolog. */
 asm ("\n/*@_init_EPILOG_ENDS*/");
index 73321ec76a02b989d296946c1217aaadc5da140a..7943bb67ff895e8820fe93e4ed4ca97e3f836522 100644 (file)
@@ -7,3 +7,7 @@ ifeq ($(subdir),elf)
 sysdep-others += lddlibc4
 install-bin += lddlibc4
 endif
+
+ifeq ($(subdir),csu)
+CFLAGS-initfini.s += -DWEAK_GMON_START
+endif