aboutsummaryrefslogtreecommitdiff
path: root/csu/gmon-start.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-09-14 08:55:27 +0000
committerRoland McGrath <roland@gnu.org>2002-09-14 08:55:27 +0000
commit65233b5850accaaf3339e050c69f59b994582e86 (patch)
tree09b02fe94b43779487d76db94e6d891eda4cb567 /csu/gmon-start.c
parent4b172769b29087fbf9989494e7d09b8c4347208e (diff)
downloadglibc-65233b5850accaaf3339e050c69f59b994582e86.zip
glibc-65233b5850accaaf3339e050c69f59b994582e86.tar.gz
glibc-65233b5850accaaf3339e050c69f59b994582e86.tar.bz2
2002-09-10 Alan Modra <amodra@bigpond.net.au>
* csu/gmon-start.c [!TEXT_START]: Define TEXT_START if not already defined in entry.h. (__gmon_start__) [!ENTRY_POINT_DECL]: Use TEXT_START macro to obtain lowest address for profiling in __monstartup call. * sysdeps/powerpc/powerpc64/elf/entry.h: New file.
Diffstat (limited to 'csu/gmon-start.c')
-rw-r--r--csu/gmon-start.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/csu/gmon-start.c b/csu/gmon-start.c
index 9ee722a..8816064 100644
--- a/csu/gmon-start.c
+++ b/csu/gmon-start.c
@@ -35,6 +35,14 @@ extern void ENTRY_POINT;
#endif
extern void etext;
+#ifndef TEXT_START
+#ifdef ENTRY_POINT_DECL
+#define TEXT_START ENTRY_POINT
+#else
+#define TEXT_START &ENTRY_POINT
+#endif
+#endif
+
#ifndef HAVE_INITFINI
/* This function gets called at startup by the normal constructor
mechanism. We link this file together with start.o to produce gcrt1.o,
@@ -66,7 +74,7 @@ __gmon_start__ (void)
#ifdef ENTRY_POINT_DECL
__monstartup ((u_long) ENTRY_POINT, (u_long) &etext);
#else
- __monstartup ((u_long) &ENTRY_POINT, (u_long) &etext);
+ __monstartup ((u_long) TEXT_START, (u_long) &etext);
#endif
/* Call _mcleanup before exiting; it will write out gmon.out from the