aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-08 23:27:46 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-08 23:27:46 +0000
commitdc27836e6bf406c89f2e567a13a194294e9e3875 (patch)
tree6a2e8e10f398f8673f211186f2a65b5a8a7e0d20
parent87c812c2ad2ed5c0d4edf6da1f2fe26251f38925 (diff)
downloadglibc-dc27836e6bf406c89f2e567a13a194294e9e3875.tar
glibc-dc27836e6bf406c89f2e567a13a194294e9e3875.tar.gz
glibc-dc27836e6bf406c89f2e567a13a194294e9e3875.tar.bz2
glibc-dc27836e6bf406c89f2e567a13a194294e9e3875.zip
Update.
* 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.
-rw-r--r--ChangeLog5
-rw-r--r--csu/initfini.c7
-rw-r--r--sysdeps/unix/sysv/linux/i386/Makefile4
3 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 05dc7111cf..361f8cf146 100644
--- 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.
diff --git a/csu/initfini.c b/csu/initfini.c
index 1f74f203a3..c68a5cff00 100644
--- a/csu/initfini.c
+++ b/csu/initfini.c
@@ -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*/");
diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile
index 73321ec76a..7943bb67ff 100644
--- a/sysdeps/unix/sysv/linux/i386/Makefile
+++ b/sysdeps/unix/sysv/linux/i386/Makefile
@@ -7,3 +7,7 @@ ifeq ($(subdir),elf)
sysdep-others += lddlibc4
install-bin += lddlibc4
endif
+
+ifeq ($(subdir),csu)
+CFLAGS-initfini.s += -DWEAK_GMON_START
+endif