1*810390e3Srobert //===- coff_platform.h -------------------------------------------*- C++-*-===// 2*810390e3Srobert // 3*810390e3Srobert // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*810390e3Srobert // See https://llvm.org/LICENSE.txt for license information. 5*810390e3Srobert // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*810390e3Srobert // 7*810390e3Srobert //===----------------------------------------------------------------------===// 8*810390e3Srobert // 9*810390e3Srobert // ORC Runtime support for dynamic loading features on COFF-based platforms. 10*810390e3Srobert // 11*810390e3Srobert //===----------------------------------------------------------------------===// 12*810390e3Srobert 13*810390e3Srobert #ifndef ORC_RT_COFF_PLATFORM_H 14*810390e3Srobert #define ORC_RT_COFF_PLATFORM_H 15*810390e3Srobert 16*810390e3Srobert #include "common.h" 17*810390e3Srobert #include "executor_address.h" 18*810390e3Srobert 19*810390e3Srobert // dlfcn functions. 20*810390e3Srobert ORC_RT_INTERFACE const char *__orc_rt_coff_jit_dlerror(); 21*810390e3Srobert ORC_RT_INTERFACE void *__orc_rt_coff_jit_dlopen(const char *path, int mode); 22*810390e3Srobert ORC_RT_INTERFACE int __orc_rt_coff_jit_dlclose(void *header); 23*810390e3Srobert ORC_RT_INTERFACE void *__orc_rt_coff_jit_dlsym(void *header, 24*810390e3Srobert const char *symbol); 25*810390e3Srobert 26*810390e3Srobert namespace __orc_rt { 27*810390e3Srobert namespace coff { 28*810390e3Srobert 29*810390e3Srobert enum dlopen_mode : int { 30*810390e3Srobert ORC_RT_RTLD_LAZY = 0x1, 31*810390e3Srobert ORC_RT_RTLD_NOW = 0x2, 32*810390e3Srobert ORC_RT_RTLD_LOCAL = 0x4, 33*810390e3Srobert ORC_RT_RTLD_GLOBAL = 0x8 34*810390e3Srobert }; 35*810390e3Srobert 36*810390e3Srobert } // end namespace coff 37*810390e3Srobert } // end namespace __orc_rt 38*810390e3Srobert 39*810390e3Srobert #endif 40