blob: 93467feae01b82058877353bdbd228f0b672bea7 [file] [log] [blame]
njna7598f62005-06-18 03:27:58 +00001
2/*--------------------------------------------------------------------*/
3/*--- The trampoline code page. pub_core_trampoline.h ---*/
4/*--------------------------------------------------------------------*/
5
6/*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
9
10 Copyright (C) 2000-2005 Julian Seward
11 jseward@acm.org
12
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26 02111-1307, USA.
27
28 The GNU General Public License is contained in the file COPYING.
29*/
30
31#ifndef __PUB_CORE_TRAMPOLINE_H
32#define __PUB_CORE_TRAMPOLINE_H
33
34//--------------------------------------------------------------------
sewardjb9bce632005-06-21 01:41:34 +000035// PURPOSE: This module defines a few replacement functions for Linux
36// vsyscalls, which we can't implement directly. It also contains
37// stubs for signal returns. Note, all the code within runs on the
38// simulated CPU. The vsyscall stubs are gotten to by use of the
39// redirect mechanism.
njna7598f62005-06-18 03:27:58 +000040//--------------------------------------------------------------------
41
sewardjb9bce632005-06-21 01:41:34 +000042/* These two delimit our handwritten assembly code, so we can tell
43 tools which track memory that this area should be regarded as
44 readable, at least. Otherwise Memcheck complains we're jumping to
45 invalid addresses. */
njn7d2a9c42005-06-19 21:49:28 +000046
sewardjb9bce632005-06-21 01:41:34 +000047extern void VG_(trampoline_stuff_start);
48extern void VG_(trampoline_stuff_end);
njna7598f62005-06-18 03:27:58 +000049
sewardjb9bce632005-06-21 01:41:34 +000050#if defined(VGP_x86_linux)
51extern void VG_(x86_linux_SUBST_FOR_sigreturn);
52extern void VG_(x86_linux_SUBST_FOR_rt_sigreturn);
53extern void VG_(x86_linux_REDIR_FOR__dl_sysinfo_int80);
54#endif
njna7598f62005-06-18 03:27:58 +000055
sewardjb9bce632005-06-21 01:41:34 +000056#if defined(VGP_amd64_linux)
57extern void VG_(amd64_linux_SUBST_FOR_rt_sigreturn);
58extern void VG_(amd64_linux_REDIR_FOR_vgettimeofday);
59extern void VG_(amd64_linux_REDIR_FOR_vtime);
60#endif
sewardjad50be32005-08-18 11:54:30 +000061
62#if defined(VGP_ppc32_linux)
63extern UInt VG_(ppc32_linux_REDIR_FOR_strlen)( void* );
64#endif
njna7598f62005-06-18 03:27:58 +000065
66#endif // __PUB_CORE_TRAMPOLINE_H
67
68/*--------------------------------------------------------------------*/
69/*--- end ---*/
70/*--------------------------------------------------------------------*/