|
From: <sv...@va...> - 2005-09-20 13:06:39
|
Author: tom
Date: 2005-09-20 14:06:32 +0100 (Tue, 20 Sep 2005)
New Revision: 4701
Log:
Make the change in ownership of the trampoline area apply to all
platforms as it is not an amd64 specific problem.
Modified:
branches/ASPACEM/coregrind/m_redir.c
branches/ASPACEM/coregrind/m_trampoline.S
Modified: branches/ASPACEM/coregrind/m_redir.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
--- branches/ASPACEM/coregrind/m_redir.c 2005-09-20 12:48:45 UTC (rev 470=
0)
+++ branches/ASPACEM/coregrind/m_redir.c 2005-09-20 13:06:32 UTC (rev 470=
1)
@@ -366,6 +366,14 @@
(Addr)&VG_(amd64_linux_REDIR_FOR_vtime)=20
);
=20
+#elif defined(VGP_ppc32_linux)
+
+ //CAB: TODO
+
+#else
+# error Unknown platform
+#endif
+
{ Addr co_start =3D VG_PGROUNDDN( (Addr)&VG_(trampoline_stuff_start=
) );
Addr co_endPlus =3D VG_PGROUNDUP( (Addr)&VG_(trampoline_stuff_end) =
);
VG_(debugLog)(1,"redir",
@@ -374,14 +382,6 @@
return=20
VG_(am_change_ownership_v_to_c)( co_start, co_endPlus - co_start=
);
}
-
-#elif defined(VGP_ppc32_linux)
-
- //CAB: TODO
-
-#else
-# error Unknown platform
-#endif
}
=20
/* Z-decode a symbol into library:func form, eg=20
Modified: branches/ASPACEM/coregrind/m_trampoline.S
=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
--- branches/ASPACEM/coregrind/m_trampoline.S 2005-09-20 12:48:45 UTC (re=
v 4700)
+++ branches/ASPACEM/coregrind/m_trampoline.S 2005-09-20 13:06:32 UTC (re=
v 4701)
@@ -37,6 +37,15 @@
This code runs on the simulated CPU.
*/
=20
+# define UD2_16 ud2 ; ud2 ; ud2 ; ud2 ;ud2 ; ud2 ; ud2 ; ud2
+# define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16
+# define UD2_256 UD2_64 ; UD2_64 ; UD2_64 ; UD2_64
+# define UD2_1024 UD2_256 ; UD2_256 ; UD2_256 ; UD2_256
+# define UD2_PAGE UD2_1024 ; UD2_1024 ; UD2_1024 ; UD2_1024 =20
+
+ /* a leading page of unexecutable code */
+ UD2_PAGE
+=09
/*---------------- x86-linux ----------------*/
#if defined(VGP_x86_linux)
=20
@@ -73,15 +82,6 @@
#else
#if defined(VGP_amd64_linux)
=20
-# define UD2_16 ud2 ; ud2 ; ud2 ; ud2 ;ud2 ; ud2 ; ud2 ; ud2
-# define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16
-# define UD2_256 UD2_64 ; UD2_64 ; UD2_64 ; UD2_64
-# define UD2_1024 UD2_256 ; UD2_256 ; UD2_256 ; UD2_256
-# define UD2_PAGE UD2_1024 ; UD2_1024 ; UD2_1024 ; UD2_1024 =20
-
- /* a leading page of unexecutable code */
- UD2_PAGE
-=09
.global VG_(trampoline_stuff_start)
VG_(trampoline_stuff_start):
=20
@@ -108,16 +108,7 @@
.global VG_(trampoline_stuff_end)
VG_(trampoline_stuff_end):
=20
- /* and a trailing page of unexecutable code */
- UD2_PAGE
=20
-# undef UD2_16
-# undef UD2_64
-# undef UD2_256
-# undef UD2_1024
-# undef UD2_PAGE
-
-
/*---------------- ppc32-linux ----------------*/
#else
#if defined(VGP_ppc32_linux)
@@ -138,9 +129,16 @@
#endif
#endif
=20
-tramp_code_end:
+ /* and a trailing page of unexecutable code */
+ UD2_PAGE
=20
+# undef UD2_16
+# undef UD2_64
+# undef UD2_256
+# undef UD2_1024
+# undef UD2_PAGE
=20
+
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
=09
|