[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / openmp / libomptarget / plugins / common / elf_common / elf_common.h
bloba342c19a42805fedeb280b36588acadb5bd766bb
1 //===-- elf_common.h - Common ELF functionality -----------------*- 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 // Common ELF functionality for target plugins.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_OPENMP_LIBOMPTARGET_PLUGINS_COMMON_ELF_COMMON_ELF_COMMON_H
14 #define LLVM_OPENMP_LIBOMPTARGET_PLUGINS_COMMON_ELF_COMMON_ELF_COMMON_H
16 #include "omptargetplugin.h"
17 #include <cstdint>
19 /// Return non-zero, if the given \p image is an ELF object, which
20 /// e_machine matches \p target_id; return zero otherwise.
21 EXTERN int32_t elf_check_machine(__tgt_device_image *image, uint16_t target_id);
23 /// Return non-zero, if the given \p image is an ET_DYN ELF object;
24 /// return zero otherwise.
25 EXTERN int32_t elf_is_dynamic(__tgt_device_image *image);
27 #endif // LLVM_OPENMP_LIBOMPTARGET_PLUGINS_COMMON_ELF_COMMON_ELF_COMMON_H