about summary refs log tree commit diff
path: root/ports/sysdeps/ia64/entry.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/sysdeps/ia64/entry.h')
-rw-r--r--ports/sysdeps/ia64/entry.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ports/sysdeps/ia64/entry.h b/ports/sysdeps/ia64/entry.h
index b93e1b6a57..e11b49fc53 100644
--- a/ports/sysdeps/ia64/entry.h
+++ b/ports/sysdeps/ia64/entry.h
@@ -1,10 +1,13 @@
+#include <link.h>
+#include <dl-fptr.h>
+
 #ifndef __ASSEMBLY__
 extern void _start (void);
 #endif
 
 /* The function's entry point is stored in the first word of the
    function descriptor (plabel) of _start().  */
-#define ENTRY_POINT (((long int *) _start)[0])
+#define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip
 
 /* We have to provide a special declaration.  */
 #define ENTRY_POINT_DECL(class) class void _start (void);