* 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.
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.
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");
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
{
/* do nothing */
}
+#endif
/* End of the _init epilog, beginning of the _fini prolog. */
asm ("\n/*@_init_EPILOG_ENDS*/");
sysdep-others += lddlibc4
install-bin += lddlibc4
endif
+
+ifeq ($(subdir),csu)
+CFLAGS-initfini.s += -DWEAK_GMON_START
+endif