LLVM: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDCHECKERIMPL_H

10#define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDCHECKERIMPL_H

11

13

14namespace llvm {

15

16

18

22

23 using IsSymbolValidFunction =

29

30public:

32 GetSymbolInfoFunction GetSymbolInfo,

33 GetSectionInfoFunction GetSectionInfo,

34 GetStubInfoFunction GetStubInfo,

35 GetGOTInfoFunction GetGOTInfo,

38

41

42private:

43

44

45

48

49 bool isSymbolValid(StringRef Symbol) const;

53

55

60

61 std::pair<uint64_t, std::string> getSectionAddr(StringRef FileName,

63 bool IsInsideLoad) const;

64

65 std::pair<uint64_t, std::string>

67 StringRef StubKindFilter, bool IsInsideLoad,

68 bool IsStubAddr) const;

69

70 std::optional<uint64_t> getSectionLoadAddress(void *LocalAddr) const;

71

72 IsSymbolValidFunction IsSymbolValid;

73 GetSymbolInfoFunction GetSymbolInfo;

74 GetSectionInfoFunction GetSectionInfo;

75 GetStubInfoFunction GetStubInfo;

76 GetGOTInfoFunction GetGOTInfo;

79 std::string CPU;

82};

83}

84

85#endif

static bool lookup(const GsymReader &GR, DataExtractor &Data, uint64_t &Offset, uint64_t BaseAddr, uint64_t Addr, SourceLocations &SrcLocs, llvm::Error &Err)

A Lookup helper functions.

static FeatureBitset getFeatures(MCSubtargetInfo &STI, StringRef CPU, StringRef TuneCPU, StringRef FS, ArrayRef< StringRef > ProcNames, ArrayRef< SubtargetSubTypeKV > ProcDesc, ArrayRef< SubtargetFeatureKV > ProcFeatures)

Tagged union holding either a T or a Error.

std::set< StringRef > LookupSet

This interface provides simple read-only access to a block of memory, and provides simple methods for...

bool checkAllRulesInBuffer(StringRef RulePrefix, MemoryBuffer *MemBuf) const

friend class RuntimeDyldCheckerExprEval

Definition RuntimeDyldCheckerImpl.h:21

bool check(StringRef CheckExpr) const

friend class RuntimeDyldChecker

Definition RuntimeDyldCheckerImpl.h:20

RuntimeDyldCheckerImpl(IsSymbolValidFunction IsSymbolValid, GetSymbolInfoFunction GetSymbolInfo, GetSectionInfoFunction GetSectionInfo, GetStubInfoFunction GetStubInfo, GetGOTInfoFunction GetGOTInfo, llvm::endianness Endianness, Triple TT, StringRef CPU, SubtargetFeatures TF, llvm::raw_ostream &ErrStream)

std::function< bool(StringRef Symbol)> IsSymbolValidFunction

std::function< Expected< MemoryRegionInfo >( StringRef FileName, StringRef SectionName)> GetSectionInfoFunction

std::function< Expected< MemoryRegionInfo >( StringRef GOTContainer, StringRef TargetName)> GetGOTInfoFunction

std::function< Expected< MemoryRegionInfo >(StringRef SymbolName)> GetSymbolInfoFunction

std::function< Expected< MemoryRegionInfo >( StringRef StubContainer, StringRef TargetName, StringRef StubKindFilter)> GetStubInfoFunction

StringRef - Represent a constant reference to a string, i.e.

Manages the enabling and disabling of subtarget specific features.

Triple - Helper class for working with autoconf configuration names.

This class implements an extremely fast bulk output stream that can only output to a stream.

This is an optimization pass for GlobalISel generic memory operations.

static StringRef getCPU(StringRef CPU)

Processes a CPU name.

uint8_t TargetFlagsType

Holds target-specific properties for a symbol.