This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: Fix _start in csu/gmon-start.c.


On Wed, Jul 25, 2001 at 10:22:48AM -0700, Daniel Jacobowitz wrote:
> On Wed, Jul 25, 2001 at 05:08:18AM -0700, Geoff Keating wrote:
> > > Date: Tue, 24 Jul 2001 16:09:40 -0700
> > > From: "H . J . Lu" <hjl@lucon.org>
> > 
> > > Do libgcj and gprof work on Linux/mips? I don't think they are
> > > supported on any mips target. Here is a patch to disable them.
> > 
> > gprof, at least, ought to work.  libgcj should work if Java works, if
> > not then it should be disabled along with the rest of the Java stuff,
> > which is done elsewhere.
> 
> If I remove gprof from noconfigdirs in configure.in, it builds
> perfectly well.  Of course, -pg compiled binaries don't link, because
> glibc has this comment:
> 
>    2) That under Linux the entry is named __start
>       and not just plain _start.  */
> 
> And no alias for _start.  Thus gcrt1.o fails to link in properly.  I
> don't know what the right solution to that is.
> 

Try this patch.


H.J.
----
2001-07-25  H.J. Lu  <hjl@gnu.org>

	* csu/gmon-start.c: Include <entry.h>
	(_start): Replaced with ENTRY_POINT.

--- csu/gmon-start.c.entry	Sat Jul  7 16:44:43 2001
+++ csu/gmon-start.c	Wed Jul 25 14:08:10 2001
@@ -21,12 +21,14 @@
 #include <sys/gmon.h>
 #include <stdlib.h>
 #include <unistd.h>
+#define __ASSEMBLY__
+#include <entry.h>
 
 /* Beginning and end of our code segment. We cannot declare them
    as the external functions since we want the addresses of those
    labels. Taking the address of a function may have different
    meanings on different platforms. */
-extern void _start, etext;
+extern void ENTRY_POINT, etext;
 
 #ifndef HAVE_INITFINI
 /* This function gets called at startup by the normal constructor
@@ -56,7 +58,7 @@ __gmon_start__ (void)
 #endif
 
   /* Start keeping profiling records.  */
-  __monstartup ((u_long) &_start, (u_long) &etext);
+  __monstartup ((u_long) &ENTRY_POINT, (u_long) &etext);
 
   /* Call _mcleanup before exiting; it will write out gmon.out from the
      collected data.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]