1 //===-- elf_common.h - Common ELF functionality -----------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
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"
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 TargetId
);
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