A patch for csu/gmon-start.c
H . J . Lu
hjl@valinux.com
Wed Apr 19 10:40:00 GMT 2000
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
More information about the Libc-hacker
mailing list