From 65233b5850accaaf3339e050c69f59b994582e86 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 14 Sep 2002 08:55:27 +0000 Subject: 2002-09-10 Alan Modra * 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. --- csu/gmon-start.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'csu') 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 -- cgit v1.1