This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

A patch for csu/gmon-start.c


On ia64, the address of a function is not the address of the
label of the function. To get the address of a function label,
we cannot declare it as a function. Does this patch look ok?


-- 
H.J. Lu (hjl@gnu.org)
---
2000-04-19  H.J. Lu  <hjl@gnu.org>

	* csu/gmon-start.c (_start): Declared as "extern unsigned long".
	(etext): Likewise.

--- /work/gnu/src/glibc-2.1/csu/gmon-start.c	Tue Jul 29 08:29:33 1997
+++ csu/gmon-start.c	Wed Apr 19 09:41:35 2000
@@ -22,8 +22,11 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-/* Beginning and end of our code segment.  */
-extern void _start (void), etext (void);
+/* 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 const unsigned long _start, etext;
 
 #ifndef HAVE_INITFINI
 /* This function gets called at startup by the normal constructor

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