|
From: <sv...@va...> - 2005-12-06 21:47:43
|
Author: sewardj
Date: 2005-12-06 21:47:38 +0000 (Tue, 06 Dec 2005)
New Revision: 5301
Log:
On ppc64-linux, the entry point address is a function descriptor, not
a function address.
Modified:
trunk/coregrind/m_ume.c
Modified: trunk/coregrind/m_ume.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_ume.c 2005-12-06 20:53:44 UTC (rev 5300)
+++ trunk/coregrind/m_ume.c 2005-12-06 21:47:38 UTC (rev 5301)
@@ -493,8 +493,15 @@
info->exe_base =3D minaddr + ebase;
info->exe_end =3D maxaddr + ebase;
=20
+#if defined(VGP_ppc64_linux)
+ /* On PPC64, a func ptr is represented by a TOC entry ptr. This
+ TOC entry contains three words; the first word is the function
+ address, the second word is the TOC ptr (r2), and the third word
+ is the static chain value. */
+ info->init_eip =3D ((ULong*)entry)[0];
+#else
info->init_eip =3D (Addr)entry;
-
+#endif
VG_(free)(e->p);
VG_(free)(e);
=20
|