57 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8//9// This file is a part of Sanitizer runtime. It contains Solaris-specific10// definitions.11//12//===----------------------------------------------------------------------===//13 14#ifndef SANITIZER_SOLARIS_H15#define SANITIZER_SOLARIS_H16 17#include "sanitizer_internal_defs.h"18 19#if SANITIZER_SOLARIS20 21#include <link.h>22 23namespace __sanitizer {24 25// Beginning of declaration from OpenSolaris/Illumos26// $SRC/cmd/sgs/include/rtld.h.27struct 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;36};37 38// Structure matching the Solaris 11.4 struct dl_phdr_info used to determine39// presence of dlpi_tls_modid field at runtime. Cf. Solaris 11.440// dl_iterate_phdr(3C), Example 2.41struct 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;50};51 52} // namespace __sanitizer53 54#endif // SANITIZER_SOLARIS55 56#endif // SANITIZER_SOLARIS_H57