![]() |
|
|||
File indexing completed on 2025-03-13 09:28:44
0001 0002 /*--------------------------------------------------------------------*/ 0003 /*--- Header imported directly by every tool asm file. ---*/ 0004 /*--- pub_tool_basics_asm.h ---*/ 0005 /*--------------------------------------------------------------------*/ 0006 0007 /* 0008 This file is part of Valgrind, a dynamic binary instrumentation 0009 framework. 0010 0011 Copyright (C) 2000-2017 Julian Seward 0012 jseward@acm.org 0013 0014 This program is free software; you can redistribute it and/or 0015 modify it under the terms of the GNU General Public License as 0016 published by the Free Software Foundation; either version 2 of the 0017 License, or (at your option) any later version. 0018 0019 This program is distributed in the hope that it will be useful, but 0020 WITHOUT ANY WARRANTY; without even the implied warranty of 0021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0022 General Public License for more details. 0023 0024 You should have received a copy of the GNU General Public License 0025 along with this program; if not, see <http://www.gnu.org/licenses/>. 0026 0027 The GNU General Public License is contained in the file COPYING. 0028 */ 0029 0030 #ifndef __PUB_TOOL_BASICS_ASM_H 0031 #define __PUB_TOOL_BASICS_ASM_H 0032 0033 // See pub_tool_basics.h for the purpose of these macros. 0034 // 0035 // Note that although the macros here (which are used in asm files) have the 0036 // same name as those in pub_tool_basics.h (which are used in C files), they 0037 // have different definitions. Actually, on Linux the definitions are the 0038 // same, but on Darwin they are different. The reason is that C names on 0039 // Darwin always get a '_' prepended to them by the compiler. But in order to 0040 // refer to them from asm code, we have to add the '_' ourselves. Having two 0041 // versions of these macros makes that difference transparent, so we can use 0042 // VG_/ML_ in both asm and C files. 0043 // 0044 // Note also that the exact prefixes used have to match those used in 0045 // pub_tool_basics.h. 0046 0047 #define VGAPPEND(str1,str2) str1##str2 0048 0049 #if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) 0050 # define VG_(str) VGAPPEND( vgPlain_, str) 0051 # define ML_(str) VGAPPEND( vgModuleLocal_, str) 0052 #elif defined(VGO_darwin) 0053 # define VG_(str) VGAPPEND(_vgPlain_, str) 0054 # define ML_(str) VGAPPEND(_vgModuleLocal_, str) 0055 #else 0056 # error Unknown OS 0057 #endif 0058 0059 /* Let the linker know we don't need an executable stack. 0060 The call to MARK_STACK_NO_EXEC should be put unconditionally 0061 at the end of all asm source files. 0062 */ 0063 #if defined(VGO_linux) 0064 # if defined(VGA_arm) 0065 # define MARK_STACK_NO_EXEC .section .note.GNU-stack,"",%progbits 0066 # else 0067 # define MARK_STACK_NO_EXEC .section .note.GNU-stack,"",@progbits 0068 # endif 0069 #else 0070 # define MARK_STACK_NO_EXEC 0071 #endif 0072 0073 #endif /* __PUB_TOOL_BASICS_ASM_H */ 0074 0075 /*--------------------------------------------------------------------*/ 0076 /*--- end ---*/ 0077 /*--------------------------------------------------------------------*/
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |