This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] ppc64 gmon-start change
- From: Steve Munroe <sjmunroe at vnet dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com
- Cc: aj at suse dot de, geoffk at geoffk dot org, roland at frob dot com
- Date: Tue, 10 Sep 2002 17:18:54 -0500
- Subject: [PATCH] ppc64 gmon-start change
For PowerPC64 we use the address of ._start as the lowest address for which
we need to keep profiling records. We can't copy the ia64 scheme as our
entry poiny address is really the address of the function descriptor, not
the actual function entry.
The prerequisite for this patch is "[PATCH] add PowerPC64 specific code"
which includes the new file ./sysdeps/powerpc/powerpc64/elf/entry.h.
This file defines ENTRY_POINT, ENTRY_POINT_DECL, and TEXT_START so that
gmon-start.c can obtain the address of ._start.
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.
diff -rc2PN libc23-cvstip-20020906/csu/gmon-start.c libc23/csu/gmon-start.c
*** libc23-cvstip-20020906/csu/gmon-start.c Wed Feb 13 03:16:58 2002
--- libc23/csu/gmon-start.c Fri Sep 6 15:19:48 2002
***************
*** 36,39 ****
--- 36,47 ----
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
***************
*** 67,71 ****
__monstartup ((u_long) ENTRY_POINT, (u_long) &etext);
#else
! __monstartup ((u_long) &ENTRY_POINT, (u_long) &etext);
#endif
--- 75,79 ----
__monstartup ((u_long) ENTRY_POINT, (u_long) &etext);
#else
! __monstartup ((u_long) TEXT_START, (u_long) &etext);
#endif