From 5783534d3d771630c431ada58d75640cbf4a76a3 Mon Sep 17 00:00:00 2001 From: rth Date: Sun, 24 Mar 2002 02:23:08 +0000 Subject: * config/sparc/gmon-sol2.c (internal_mcount): Assume either _start or _init begins the text segment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51248 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/sparc/gmon-sol2.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3146903e73b..ed88252a71d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-03-23 Richard Henderson + + * config/sparc/gmon-sol2.c (internal_mcount): Assume either + _start or _init begins the text segment. + 2002-03-23 David Edelsohn * config/rs6000/rs6000.h (RETURN_IN_MEMORY): Cast to HOST_WIDE_INT diff --git a/gcc/config/sparc/gmon-sol2.c b/gcc/config/sparc/gmon-sol2.c index 6d6696644d9..bcb0c060358 100644 --- a/gcc/config/sparc/gmon-sol2.c +++ b/gcc/config/sparc/gmon-sol2.c @@ -291,8 +291,10 @@ static void internal_mcount(selfpc, frompcindex) if(!already_setup) { extern char etext[]; + extern char _start[]; + extern char _init[]; already_setup = 1; - monstartup(0, (char *)etext); + monstartup(_start < _init ? _start : _init, etext); #ifdef USE_ONEXIT on_exit(_mcleanup, 0); #else -- cgit v1.2.1