LLVM 19.0.0git
Public Member Functions | Protected Member Functions | List of all members
llvm::LoadedObjectInfo Class Referenceabstract

An inferface for inquiring the load address of a loaded object file to be used by the DIContext implementations when applying relocations on the fly. More...

#include "llvm/DebugInfo/DIContext.h"

Inheritance diagram for llvm::LoadedObjectInfo:
Inheritance graph
[legend]

Public Member Functions

virtual ~LoadedObjectInfo ()=default
 
virtual uint64_t getSectionLoadAddress (const object::SectionRef &Sec) const
 Obtain the Load Address of a section by SectionRef.
 
virtual bool getLoadedSectionContents (const object::SectionRef &Sec, StringRef &Data) const
 If conveniently available, return the content of the given Section.
 
virtual std::unique_ptr< LoadedObjectInfoclone () const =0
 Obtain a copy of this LoadedObjectInfo.
 

Protected Member Functions

 LoadedObjectInfo ()=default
 
 LoadedObjectInfo (const LoadedObjectInfo &)=default
 

Detailed Description

An inferface for inquiring the load address of a loaded object file to be used by the DIContext implementations when applying relocations on the fly.

Definition at line 274 of file DIContext.h.

Constructor & Destructor Documentation

◆ LoadedObjectInfo() [1/2]

llvm::LoadedObjectInfo::LoadedObjectInfo ( )
protecteddefault

◆ LoadedObjectInfo() [2/2]

llvm::LoadedObjectInfo::LoadedObjectInfo ( const LoadedObjectInfo )
protecteddefault

◆ ~LoadedObjectInfo()

virtual llvm::LoadedObjectInfo::~LoadedObjectInfo ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr< LoadedObjectInfo > llvm::LoadedObjectInfo::clone ( ) const
pure virtual

Obtain a copy of this LoadedObjectInfo.

Implemented in llvm::LoadedObjectInfoHelper< Derived, Base >.

◆ getLoadedSectionContents()

virtual bool llvm::LoadedObjectInfo::getLoadedSectionContents ( const object::SectionRef Sec,
StringRef Data 
) const
inlinevirtual

If conveniently available, return the content of the given Section.

When the section is available in the local address space, in relocated (loaded) form, e.g. because it was relocated by a JIT for execution, this function should provide the contents of said section in Data. If the loaded section is not available, or the cost of retrieving it would be prohibitive, this function should return false. In that case, relocations will be read from the local (unrelocated) object file and applied on the fly. Note that this method is used purely for optimzation purposes in the common case of JITting in the local address space, so returning false should always be correct.

Definition at line 304 of file DIContext.h.

◆ getSectionLoadAddress()

virtual uint64_t llvm::LoadedObjectInfo::getSectionLoadAddress ( const object::SectionRef Sec) const
inlinevirtual

Obtain the Load Address of a section by SectionRef.

Calculate the address of the given section. The section need not be present in the local address space. The addresses need to be consistent with the addresses used to query the DIContext and the output of this function should be deterministic, i.e. repeated calls with the same Sec should give the same address.

Reimplemented in llvm::RuntimeDyld::LoadedObjectInfo.

Definition at line 289 of file DIContext.h.


The documentation for this class was generated from the following file: