Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:49

0001 //===----- ELF_riscv.h - JIT link functions for ELF/riscv ----*- C++ -*----===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 //===----------------------------------------------------------------------===//
0010 //
0011 // jit-link functions for ELF/riscv.
0012 //
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_EXECUTIONENGINE_JITLINK_ELF_RISCV_H
0016 #define LLVM_EXECUTIONENGINE_JITLINK_ELF_RISCV_H
0017 
0018 #include "llvm/ExecutionEngine/JITLink/JITLink.h"
0019 
0020 namespace llvm {
0021 namespace jitlink {
0022 
0023 /// Create a LinkGraph from an ELF/riscv relocatable object
0024 ///
0025 /// Note: The graph does not take ownership of the underlying buffer, nor copy
0026 /// its contents. The caller is responsible for ensuring that the object buffer
0027 /// outlives the graph.
0028 Expected<std::unique_ptr<LinkGraph>>
0029 createLinkGraphFromELFObject_riscv(MemoryBufferRef ObjectBuffer,
0030                                    std::shared_ptr<orc::SymbolStringPool> SSP);
0031 
0032 /// jit-link the given object buffer, which must be a ELF riscv object file.
0033 void link_ELF_riscv(std::unique_ptr<LinkGraph> G,
0034                     std::unique_ptr<JITLinkContext> Ctx);
0035 
0036 /// Returns a pass that performs linker relaxation. Should be added to
0037 /// PostAllocationPasses.
0038 LinkGraphPassFunction createRelaxationPass_ELF_riscv();
0039 
0040 } // end namespace jitlink
0041 } // end namespace llvm
0042 
0043 #endif // LLVM_EXECUTIONENGINE_JITLINK_ELF_RISCV_H