Fix compilation of server.cc on hpux.
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_solaris.h
blob2a21693efbf13b0f92159ac1dc8349419d03f5b3
1 //===-- sanitizer_solaris.h -------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of Sanitizer runtime. It contains Solaris-specific
10 // definitions.
12 //===----------------------------------------------------------------------===//
14 #ifndef SANITIZER_SOLARIS_H
15 #define SANITIZER_SOLARIS_H
17 #include "sanitizer_internal_defs.h"
19 #if SANITIZER_SOLARIS
21 #include <link.h>
23 namespace __sanitizer {
25 // Beginning of declaration from OpenSolaris/Illumos
26 // $SRC/cmd/sgs/include/rtld.h.
27 struct Rt_map {
28 Link_map rt_public;
29 const char *rt_pathname;
30 ulong_t rt_padstart;
31 ulong_t rt_padimlen;
32 ulong_t rt_msize;
33 uint_t rt_flags;
34 uint_t rt_flags1;
35 ulong_t rt_tlsmodid;
38 // Structure matching the Solaris 11.4 struct dl_phdr_info used to determine
39 // presence of dlpi_tls_modid field at runtime. Cf. Solaris 11.4
40 // dl_iterate_phdr(3C), Example 2.
41 struct dl_phdr_info_test {
42 ElfW(Addr) dlpi_addr;
43 const char *dlpi_name;
44 const ElfW(Phdr) * dlpi_phdr;
45 ElfW(Half) dlpi_phnum;
46 u_longlong_t dlpi_adds;
47 u_longlong_t dlpi_subs;
48 size_t dlpi_tls_modid;
49 void *dlpi_tls_data;
52 } // namespace __sanitizer
54 #endif // SANITIZER_SOLARIS
56 #endif // SANITIZER_SOLARIS_H