memcheck/tests/libstdc++.supp: rename suppression
[valgrind.git] / coregrind / m_libgcc_sup.c
blob373f80ca19668acba540aaed41af1e54c11274a7
1 /* -*- mode: C; c-basic-offset: 3; -*- */
3 /*--------------------------------------------------------------------*/
4 /*--- Supplemental functions for libgcc normally provided by glibc ---*/
5 /*--------------------------------------------------------------------*/
7 /*
8 This file is part of Valgrind, a dynamic binary instrumentation
9 framework.
11 Copyright (C) 2020 Mark Wielaard
12 mark@klomp.org
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation; either version 2 of the
17 License, or (at your option) any later version.
19 This program is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, see <http://www.gnu.org/licenses/>.
27 The GNU General Public License is contained in the file COPYING.
30 #include "config.h"
31 #include "pub_core_basics.h"
32 #include "pub_core_clientstate.h"
34 /*====================================================================*/
35 /*=== arm64 libgcc support function for init_have_lse_atomics ===*/
36 /*====================================================================*/
38 #if defined(VGP_arm64_linux)
39 struct auxv
41 Word a_type;
42 union {
43 void *a_ptr;
44 Word a_val;
45 } u;
47 #define AT_NULL 0
49 unsigned long int __getauxval (unsigned long int type);
50 unsigned long int __getauxval (unsigned long int type)
52 struct auxv *p;
53 for (p = (struct auxv *) VG_(client_auxv);
54 p != NULL && p->a_type != AT_NULL;
55 p++)
56 if (p->a_type == type)
57 return p->u.a_val;
59 return 0;
61 #endif
63 #if defined(VGO_solaris)
64 /* At least on Solaris 11.3 ar does not like
65 empty .ar files */
66 int some_symbol_to_keep_ar_happy;
67 #endif