LLDB  mainline
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ObjectFileELF Class Reference

Generic ELF object file reader. More...

#include <ObjectFileELF.h>

Inheritance diagram for ObjectFileELF:
Inheritance graph
[legend]
Collaboration diagram for ObjectFileELF:
Collaboration graph
[legend]

Public Member Functions

 ~ObjectFileELF () override
 
lldb_private::ConstString GetPluginName () override
 
uint32_t GetPluginVersion () override
 
bool ParseHeader () override
 Attempts to parse the object header. More...
 
bool SetLoadAddress (lldb_private::Target &target, lldb::addr_t value, bool value_is_offset) override
 Sets the load address for an entire module, assuming a rigid slide of sections, if possible in the implementation. More...
 
lldb::ByteOrder GetByteOrder () const override
 Gets whether endian swapping should occur when extracting data from this object file. More...
 
bool IsExecutable () const override
 Tells whether this object file is capable of being the main executable for a process. More...
 
uint32_t GetAddressByteSize () const override
 Gets the address size in bytes for the current object file. More...
 
lldb_private::AddressClass GetAddressClass (lldb::addr_t file_addr) override
 Get the address type given a file address in an object file. More...
 
lldb_private::SymtabGetSymtab () override
 Gets the symbol table for the currently selected architecture (and object for archives). More...
 
bool IsStripped () override
 Detect if this object file has been stripped of local symbols. More...
 
void CreateSections (lldb_private::SectionList &unified_section_list) override
 
void Dump (lldb_private::Stream *s) override
 Dump a description of this object to a Stream. More...
 
lldb_private::ArchSpec GetArchitecture () override
 Get the ArchSpec for this object file. More...
 
lldb_private::UUID GetUUID () override
 Gets the UUID for this object file. More...
 
lldb_private::FileSpecList GetDebugSymbolFilePaths () override
 Gets the symbol file spec list for this object file. More...
 
uint32_t GetDependentModules (lldb_private::FileSpecList &files) override
 
lldb_private::Address GetImageInfoAddress (lldb_private::Target *target) override
 Similar to Process::GetImageInfoAddress(). More...
 
lldb_private::Address GetEntryPointAddress () override
 Returns the address of the Entry Point in this object file - if the object file doesn't have an entry point (because it is not an executable file) then an invalid address is returned. More...
 
lldb_private::Address GetBaseAddress () override
 Returns base address of this object file. More...
 
ObjectFile::Type CalculateType () override
 The object file should be able to calculate its type by looking at its file header and possibly the sections or other data in the object file. More...
 
ObjectFile::Strata CalculateStrata () override
 The object file should be able to calculate the strata of the object file. More...
 
size_t ReadSectionData (lldb_private::Section *section, lldb::offset_t section_offset, void *dst, size_t dst_len) override
 
size_t ReadSectionData (lldb_private::Section *section, lldb_private::DataExtractor &section_data) override
 
llvm::ArrayRef< elf::ELFProgramHeaderProgramHeaders ()
 
lldb_private::DataExtractor GetSegmentData (const elf::ELFProgramHeader &H)
 
llvm::StringRef StripLinkerSymbolAnnotations (llvm::StringRef symbol_name) const override
 
void RelocateSection (lldb_private::Section *section) override
 Perform relocations on the section if necessary. More...
 
- Public Member Functions inherited from lldb_private::ObjectFile
 ObjectFile (const lldb::ModuleSP &module_sp, const FileSpec *file_spec_ptr, lldb::offset_t file_offset, lldb::offset_t length, const lldb::DataBufferSP &data_sp, lldb::offset_t data_offset)
 Construct with a parent module, offset, and header data. More...
 
 ObjectFile (const lldb::ModuleSP &module_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, lldb::DataBufferSP &data_sp)
 
 ~ObjectFile () override
 Destructor. More...
 
virtual uint32_t GetDependentModules (FileSpecList &file_list)=0
 Extract the dependent modules from an object file. More...
 
virtual lldb::addr_t GetFileOffset () const
 Returns the offset into a file at which this object resides. More...
 
virtual lldb::addr_t GetByteSize () const
 
virtual FileSpecGetFileSpec ()
 Get accessor to the object file specification. More...
 
virtual const FileSpecGetFileSpec () const
 Get const accessor to the object file specification. More...
 
virtual SectionListGetSectionList (bool update_module_section_list=true)
 Gets the section list for the currently selected architecture (and object for archives). More...
 
virtual void SectionFileAddressesChanged ()
 Notify the ObjectFile that the file addresses in the Sections for this module have been changed. More...
 
virtual SymbolResolveSymbolForAddress (const Address &so_addr, bool verify_unique)
 Appends a Symbol for the specified so_addr to the symbol table. More...
 
virtual void ClearSymtab ()
 Frees the symbol table. More...
 
virtual lldb_private::FileSpecList GetReExportedLibraries ()
 Gets the file spec list of libraries re-exported by this object file. More...
 
virtual bool AllowAssemblyEmulationUnwindPlans ()
 Returns if the function bounds for symbols in this symbol file are likely accurate. More...
 
virtual uint32_t GetNumThreadContexts ()
 
virtual std::string GetIdentifierString ()
 Some object files may have an identifier string embedded in them, e.g. More...
 
virtual bool GetCorefileMainBinaryInfo (lldb::addr_t &address, UUID &uuid)
 When the ObjectFile is a core file, lldb needs to locate the "binary" in the core file. More...
 
virtual lldb::RegisterContextSP GetThreadContextAtIndex (uint32_t idx, lldb_private::Thread &thread)
 
virtual void SetType (Type type)
 In cases where the type can't be calculated (elf files), this routine allows someone to explicitly set it. More...
 
virtual llvm::VersionTuple GetVersion ()
 Get the object file version numbers. More...
 
virtual llvm::VersionTuple GetMinimumOSVersion ()
 Get the minimum OS version this object file can run on. More...
 
virtual uint32_t GetSDKVersion (uint32_t *versions, uint32_t num_versions)
 Get the SDK OS version this object file was built with. More...
 
virtual bool GetIsDynamicLinkEditor ()
 Return true if this file is a dynamic link editor (dyld) More...
 
Type GetType ()
 
Strata GetStrata ()
 
size_t GetData (lldb::offset_t offset, size_t length, DataExtractor &data) const
 
size_t CopyData (lldb::offset_t offset, size_t length, void *dst) const
 
bool IsInMemory () const
 
- Public Member Functions inherited from lldb_private::PluginInterface
virtual ~PluginInterface ()
 
- Public Member Functions inherited from lldb_private::ModuleChild
 ModuleChild (const lldb::ModuleSP &module_sp)
 Construct with owning module. More...
 
 ModuleChild (const ModuleChild &rhs)
 Copy constructor. More...
 
 ~ModuleChild ()
 Destructor. More...
 
const ModuleChildoperator= (const ModuleChild &rhs)
 Assignment operator. More...
 
lldb::ModuleSP GetModule () const
 Get const accessor for the module pointer. More...
 
void SetModule (const lldb::ModuleSP &module_sp)
 Set accessor for the module pointer. More...
 

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static lldb_private::ConstString GetPluginNameStatic ()
 
static const char * GetPluginDescriptionStatic ()
 
static lldb_private::ObjectFileCreateInstance (const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length)
 
static lldb_private::ObjectFileCreateMemoryInstance (const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr)
 
static size_t GetModuleSpecifications (const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, lldb_private::ModuleSpecList &specs)
 
static bool MagicBytesMatch (lldb::DataBufferSP &data_sp, lldb::addr_t offset, lldb::addr_t length)
 
- Static Public Member Functions inherited from lldb_private::ObjectFile
static lldb::ObjectFileSP FindPlugin (const lldb::ModuleSP &module_sp, const FileSpec *file_spec, lldb::offset_t file_offset, lldb::offset_t file_size, lldb::DataBufferSP &data_sp, lldb::offset_t &data_offset)
 Find a ObjectFile plug-in that can parse file_spec. More...
 
static lldb::ObjectFileSP FindPlugin (const lldb::ModuleSP &module_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, lldb::DataBufferSP &file_data_sp)
 Find a ObjectFile plug-in that can parse a file in memory. More...
 
static size_t GetModuleSpecifications (const FileSpec &file, lldb::offset_t file_offset, lldb::offset_t file_size, ModuleSpecList &specs)
 
static size_t GetModuleSpecifications (const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t file_size, lldb_private::ModuleSpecList &specs)
 
static bool SplitArchivePathWithObject (const char *path_with_object, lldb_private::FileSpec &archive_file, lldb_private::ConstString &archive_object, bool must_exist)
 Split a path into a file path with object name. More...
 
static lldb::DataBufferSP ReadMemory (const lldb::ProcessSP &process_sp, lldb::addr_t addr, size_t byte_size)
 
static lldb::SymbolType GetSymbolTypeFromName (llvm::StringRef name, lldb::SymbolType symbol_type_hint=lldb::eSymbolTypeUndefined)
 

Protected Member Functions

std::vector< LoadableDataGetLoadableData (lldb_private::Target &target) override
 Loads this objfile to memory. More...
 
- Protected Member Functions inherited from lldb_private::ObjectFile
bool SetModulesArchitecture (const ArchSpec &new_arch)
 Sets the architecture for a module. More...
 
ConstString GetNextSyntheticSymbolName ()
 

Additional Inherited Members

- Public Types inherited from lldb_private::ObjectFile
enum  Type {
  eTypeInvalid = 0, eTypeCoreFile, eTypeExecutable, eTypeDebugInfo,
  eTypeDynamicLinker, eTypeObjectFile, eTypeSharedLibrary, eTypeStubLibrary,
  eTypeJIT, eTypeUnknown
}
 
enum  Strata {
  eStrataInvalid = 0, eStrataUnknown, eStrataUser, eStrataKernel,
  eStrataRawImage, eStrataJIT
}
 
- Static Protected Member Functions inherited from lldb_private::ObjectFile
static lldb::DataBufferSP MapFileData (const FileSpec &file, uint64_t Size, uint64_t Offset)
 
- Protected Attributes inherited from lldb_private::ObjectFile
FileSpec m_file
 
Type m_type
 
Strata m_strata
 
lldb::addr_t m_file_offset
 The offset in bytes into the file, or the address in memory. More...
 
lldb::addr_t m_length
 The length of this object file if it is known (can be zero if length is unknown or can't be determined). More...
 
DataExtractor m_data
 The data for this object file so things can be parsed lazily. More...
 
lldb::ProcessWP m_process_wp
 
const lldb::addr_t m_memory_addr
 
std::unique_ptr< lldb_private::SectionListm_sections_up
 
std::unique_ptr< lldb_private::Symtabm_symtab_up
 
uint32_t m_synthetic_symbol_idx
 
- Protected Attributes inherited from lldb_private::ModuleChild
lldb::ModuleWP m_module_wp
 The Module that owns the object that inherits from this class. More...
 

Detailed Description

Generic ELF object file reader.

This class provides a generic ELF (32/64 bit) reader plugin implementing the ObjectFile protocol.

Definition at line 57 of file ObjectFileELF.h.

Constructor & Destructor Documentation

◆ ~ObjectFileELF()

ObjectFileELF::~ObjectFileELF ( )
override

Definition at line 744 of file ObjectFileELF.cpp.

Member Function Documentation

◆ CalculateStrata()

ObjectFile::Strata ObjectFileELF::CalculateStrata ( )
overridevirtual

The object file should be able to calculate the strata of the object file.

Many object files for platforms might be for either user space debugging or for kernel debugging. If your object file subclass can figure this out, it will help with debugger plug-in selection when it comes time to debug.

Returns
The calculated object file strata for the current object file.

Implements lldb_private::ObjectFile.

Definition at line 3246 of file ObjectFileELF.cpp.

◆ CalculateType()

ObjectFile::Type ObjectFileELF::CalculateType ( )
overridevirtual

The object file should be able to calculate its type by looking at its file header and possibly the sections or other data in the object file.

The file type is used in the debugger to help select the correct plug- ins for the job at hand, so this is important to get right. If any eTypeXXX definitions do not match up with the type of file you are loading, please feel free to add a new enumeration value.

Returns
The calculated file type for the current object file.

Implements lldb_private::ObjectFile.

Definition at line 3218 of file ObjectFileELF.cpp.

◆ CreateInstance()

ObjectFile * ObjectFileELF::CreateInstance ( const lldb::ModuleSP &  module_sp,
lldb::DataBufferSP &  data_sp,
lldb::offset_t  data_offset,
const lldb_private::FileSpec file,
lldb::offset_t  file_offset,
lldb::offset_t  length 
)
static

Definition at line 359 of file ObjectFileELF.cpp.

◆ CreateMemoryInstance()

ObjectFile * ObjectFileELF::CreateMemoryInstance ( const lldb::ModuleSP &  module_sp,
lldb::DataBufferSP &  data_sp,
const lldb::ProcessSP &  process_sp,
lldb::addr_t  header_addr 
)
static

Definition at line 402 of file ObjectFileELF.cpp.

◆ CreateSections()

void ObjectFileELF::CreateSections ( lldb_private::SectionList unified_section_list)
overridevirtual

◆ Dump()

void ObjectFileELF::Dump ( lldb_private::Stream s)
overridevirtual

◆ GetAddressByteSize()

uint32_t ObjectFileELF::GetAddressByteSize ( ) const
overridevirtual

Gets the address size in bytes for the current object file.

Returns
The size of an address in bytes for the currently selected architecture (and object for archives). Returns zero if no architecture or object has been selected.

Implements lldb_private::ObjectFile.

Definition at line 804 of file ObjectFileELF.cpp.

◆ GetAddressClass()

AddressClass ObjectFileELF::GetAddressClass ( lldb::addr_t  file_addr)
overridevirtual

Get the address type given a file address in an object file.

Many binary file formats know what kinds This is primarily for ARM binaries, though it can be applied to any executable file format that supports different opcode types within the same binary. ARM binaries support having both ARM and Thumb within the same executable container. We need to be able to get

Returns
The size of an address in bytes for the currently selected architecture (and object for archives). Returns zero if no architecture or object has been selected.

Reimplemented from lldb_private::ObjectFile.

Definition at line 808 of file ObjectFileELF.cpp.

References lldb_private::ObjectFile::GetAddressClass(), and lldb_private::Symtab::GetObjectFile().

◆ GetArchitecture()

ArchSpec ObjectFileELF::GetArchitecture ( )
overridevirtual

Get the ArchSpec for this object file.

Returns
The ArchSpec of this object file. In case of error, an invalid ArchSpec object is returned.

Implements lldb_private::ObjectFile.

Definition at line 3192 of file ObjectFileELF.cpp.

References lldb_private::DataExtractor::SetData().

◆ GetBaseAddress()

Address ObjectFileELF::GetBaseAddress ( )
overridevirtual

Returns base address of this object file.

This also sometimes referred to as the "preferred load address" or the "image base address". Addresses within object files are often expressed relative to this base. If this address corresponds to a specific section (usually the first byte of the first section) then the returned address will have this section set. Otherwise, the address will just have the offset member filled in, indicating that this represents a file address.

Reimplemented from lldb_private::ObjectFile.

Definition at line 994 of file ObjectFileELF.cpp.

References lldb_private::Status::AsCString(), elf::ELFDynamic::d_tag, elf::ELFDynamic::d_val, elf::ELFHeader::e_flags, elf::ELFHeader::e_ident, elf::ELFHeader::e_machine, elf::ELFHeader::e_phentsize, elf::ELFHeader::e_phnum, elf::ELFHeader::e_phoff, elf::ELFHeader::e_shentsize, elf::ELFHeader::e_shnum, elf::ELFHeader::e_shoff, elf::ELFHeader::e_shstrndx, lldb_private::eArchTypeELF, lldb_private::ArchSpec::eMIPS_ABI_FP_64, lldb_private::ArchSpec::eMIPS_ABI_FP_64A, lldb_private::ArchSpec::eMIPS_ABI_FP_ANY, lldb_private::ArchSpec::eMIPS_ABI_FP_DOUBLE, lldb_private::ArchSpec::eMIPS_ABI_FP_OLD_64, lldb_private::ArchSpec::eMIPS_ABI_FP_SINGLE, lldb_private::ArchSpec::eMIPS_ABI_FP_SOFT, lldb_private::ArchSpec::eMIPS_ABI_FP_XX, lldb_private::ArchSpec::eMIPSABI_EABI32, lldb_private::ArchSpec::eMIPSABI_EABI64, lldb_private::ArchSpec::eMIPSABI_N32, lldb_private::ArchSpec::eMIPSABI_N64, lldb_private::ArchSpec::eMIPSABI_O32, lldb_private::ArchSpec::eMIPSABI_O64, lldb::eSectionTypeELFDynamicLinkInfo, lldb_private::Status::Fail(), lldb_private::SectionList::FindSectionByID(), lldb_private::SectionList::FindSectionByType(), lldb_private::DataExtractor::GetAddress(), lldb_private::DataExtractor::GetAddressByteSize(), ELFNote::GetByteSize(), lldb_private::DataExtractor::GetByteSize(), lldb_private::DataExtractor::GetCStr(), lldb_private::ArchSpec::GetFlags(), lldb_private::UserID::GetID(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::ArchSpec::GetMachine(), lldb_private::Section::GetObjectFile(), GetOsFromOSABI(), lldb_private::ArchSpec::GetTriple(), lldb_private::DataExtractor::GetU32(), lldb_private::DataExtractor::GetU8(), lldb_private::DataExtractor::GetULEB128(), lldb_private::ArchSpec::IsMIPS(), lldb_private::UUID::IsValid(), LIBLLDB_LOG_MODULES, LLDB_INVALID_ADDRESS, ELFNote::n_descsz, ELFNote::n_name, ELFNote::n_namesz, ELFNote::n_type, NT_FILE, elf::ELFProgramHeader::p_type, ELFNote::Parse(), lldb_private::postfix::Parse(), elf::ELFDynamic::Parse(), lldb_private::DataExtractor::PeekCStr(), lldb_private::DataExtractor::PeekData(), lldb_private::Log::Printf(), SegmentID(), lldb_private::ArchSpec::SetArchitecture(), lldb_private::DataExtractor::SetData(), lldb_private::Status::SetErrorString(), lldb_private::Status::SetErrorStringWithFormat(), lldb_private::ArchSpec::SetFlags(), subTypeFromElfHeader(), and UNUSED_IF_ASSERT_DISABLED.

◆ GetByteOrder()

ByteOrder ObjectFileELF::GetByteOrder ( ) const
overridevirtual

Gets whether endian swapping should occur when extracting data from this object file.

Returns
Returns true if endian swapping is needed, false otherwise.

Implements lldb_private::ObjectFile.

Definition at line 796 of file ObjectFileELF.cpp.

References lldb::eByteOrderBig, lldb::eByteOrderInvalid, and lldb::eByteOrderLittle.

◆ GetDebugSymbolFilePaths()

lldb_private::FileSpecList ObjectFileELF::GetDebugSymbolFilePaths ( )
overridevirtual

Gets the symbol file spec list for this object file.

If the object file format contains a debug symbol file link, the values will be returned in the FileSpecList.

Returns
Returns filespeclist.

Reimplemented from lldb_private::ObjectFile.

Definition at line 888 of file ObjectFileELF.cpp.

◆ GetDependentModules()

uint32_t ObjectFileELF::GetDependentModules ( lldb_private::FileSpecList &  files)
override

Definition at line 898 of file ObjectFileELF.cpp.

◆ GetEntryPointAddress()

lldb_private::Address ObjectFileELF::GetEntryPointAddress ( )
overridevirtual

Returns the address of the Entry Point in this object file - if the object file doesn't have an entry point (because it is not an executable file) then an invalid address is returned.

Returns
Returns the entry address for this module.

Reimplemented from lldb_private::ObjectFile.

Definition at line 977 of file ObjectFileELF.cpp.

◆ GetImageInfoAddress()

Address ObjectFileELF::GetImageInfoAddress ( lldb_private::Target target)
overridevirtual

Similar to Process::GetImageInfoAddress().

Some platforms embed auxiliary structures useful to debuggers in the address space of the inferior process. This method returns the address of such a structure if the information can be resolved via entries in the object file. ELF, for example, provides a means to hook into the runtime linker so that a debugger may monitor the loading and unloading of shared libraries.

Returns
The address of any auxiliary tables, or an invalid address if this object file format does not support or contain such information.

Reimplemented from lldb_private::ObjectFile.

Definition at line 910 of file ObjectFileELF.cpp.

References elf::ELFDynamic::d_tag, lldb::eSectionTypeELFDynamicLinkInfo, lldb_private::SectionList::FindSectionByType(), LLDB_INVALID_ADDRESS, lldb_private::Target::ReadPointerFromMemory(), lldb_private::Target::ReadUnsignedIntegerFromMemory(), lldb_private::Address::SetOffset(), lldb_private::Status::Success(), and UINT64_MAX.

◆ GetLoadableData()

std::vector< ObjectFile::LoadableData > ObjectFileELF::GetLoadableData ( lldb_private::Target target)
overrideprotectedvirtual

Loads this objfile to memory.

Loads the bits needed to create an executable image to the memory. It is useful with bare-metal targets where target does not have the ability to start a process itself.

Parameters
[in]targetTarget where to load.
Returns

Reimplemented from lldb_private::ObjectFile.

Definition at line 3360 of file ObjectFileELF.cpp.

References lldb_private::ObjectFile::LoadableData::Contents, lldb_private::ObjectFile::LoadableData::Dest, and LLDB_INVALID_ADDRESS.

◆ GetModuleSpecifications()

size_t ObjectFileELF::GetModuleSpecifications ( const lldb_private::FileSpec file,
lldb::DataBufferSP &  data_sp,
lldb::offset_t  data_offset,
lldb::offset_t  file_offset,
lldb::offset_t  length,
lldb_private::ModuleSpecList specs 
)
static

◆ GetPluginDescriptionStatic()

const char * ObjectFileELF::GetPluginDescriptionStatic ( )
static

Definition at line 355 of file ObjectFileELF.cpp.

◆ GetPluginName()

lldb_private::ConstString ObjectFileELF::GetPluginName ( )
overridevirtual

Implements lldb_private::PluginInterface.

Definition at line 713 of file ObjectFileELF.cpp.

◆ GetPluginNameStatic()

lldb_private::ConstString ObjectFileELF::GetPluginNameStatic ( )
static

Definition at line 350 of file ObjectFileELF.cpp.

◆ GetPluginVersion()

uint32_t ObjectFileELF::GetPluginVersion ( )
overridevirtual

Implements lldb_private::PluginInterface.

Definition at line 717 of file ObjectFileELF.cpp.

◆ GetSegmentData()

DataExtractor ObjectFileELF::GetSegmentData ( const elf::ELFProgramHeader H)

◆ GetSymtab()

Symtab * ObjectFileELF::GetSymtab ( )
overridevirtual

Gets the symbol table for the currently selected architecture (and object for archives).

Symbol table parsing can be deferred by ObjectFile instances until this accessor is called the first time.

Returns
The symbol table for this object file.

Implements lldb_private::ObjectFile.

Definition at line 2727 of file ObjectFileELF.cpp.

References lldb::eSectionTypeELFDynamicSymbols, lldb::eSectionTypeELFSymbolTable, lldb_private::SectionList::FindSectionByType(), lldb_private::SectionList::FindSectionContainingFileAddress(), lldb_private::UserID::GetID(), lldb_private::Section::GetObjectFile(), and lldb_private::ObjectFile::GetSymtab().

◆ GetUUID()

UUID ObjectFileELF::GetUUID ( )
overridevirtual

Gets the UUID for this object file.

If the object file format contains a UUID, the value should be returned. Else ObjectFile instances should return the MD5 checksum of all of the bytes for the object file (or memory for memory based object files).

Returns
The object file's UUID. In case of an error, an empty UUID is returned.

Implements lldb_private::ObjectFile.

Definition at line 849 of file ObjectFileELF.cpp.

References calc_gnu_debuglink_crc32().

◆ Initialize()

void ObjectFileELF::Initialize ( )
static

Definition at line 340 of file ObjectFileELF.cpp.

Referenced by lldb_private::SystemInitializerFull::Initialize().

◆ IsExecutable()

bool ObjectFileELF::IsExecutable ( ) const
overridevirtual

Tells whether this object file is capable of being the main executable for a process.

Returns
true if it is, false otherwise.

Implements lldb_private::ObjectFile.

Definition at line 746 of file ObjectFileELF.cpp.

◆ IsStripped()

bool ObjectFileELF::IsStripped ( )
overridevirtual

Detect if this object file has been stripped of local symbols.

Detect if this object file has been stripped of local symbols.

Returns
Return true if the object file has been stripped of local symbols.

Implements lldb_private::ObjectFile.

Definition at line 2907 of file ObjectFileELF.cpp.

◆ MagicBytesMatch()

bool ObjectFileELF::MagicBytesMatch ( lldb::DataBufferSP &  data_sp,
lldb::addr_t  offset,
lldb::addr_t  length 
)
static

Definition at line 421 of file ObjectFileELF.cpp.

Referenced by GetModuleSpecifications().

◆ ParseHeader()

bool ObjectFileELF::ParseHeader ( )
overridevirtual

Attempts to parse the object header.

This function is used as a test to see if a given plug-in instance can parse the header data already contained in ObjectFile::m_data. If an object file parser does not recognize that magic bytes in a header, false should be returned and the next plug-in can attempt to parse an object file.

Returns
Returns true if the header was parsed successfully, false otherwise.

Implements lldb_private::ObjectFile.

Definition at line 844 of file ObjectFileELF.cpp.

◆ ProgramHeaders()

llvm::ArrayRef< ELFProgramHeader > ObjectFileELF::ProgramHeaders ( )

Definition at line 3342 of file ObjectFileELF.cpp.

Referenced by ProcessElfCore::DoLoadCore().

◆ ReadSectionData() [1/2]

size_t ObjectFileELF::ReadSectionData ( lldb_private::Section section,
lldb::offset_t  section_offset,
void *  dst,
size_t  dst_len 
)
overridevirtual

◆ ReadSectionData() [2/2]

size_t ObjectFileELF::ReadSectionData ( lldb_private::Section section,
lldb_private::DataExtractor section_data 
)
overridevirtual

◆ RelocateSection()

void ObjectFileELF::RelocateSection ( lldb_private::Section section)
overridevirtual

◆ SetLoadAddress()

bool ObjectFileELF::SetLoadAddress ( lldb_private::Target target,
lldb::addr_t  value,
bool  value_is_offset 
)
overridevirtual

Sets the load address for an entire module, assuming a rigid slide of sections, if possible in the implementation.

Returns
Returns true iff any section's load address changed.

Reimplemented from lldb_private::ObjectFile.

Definition at line 750 of file ObjectFileELF.cpp.

References lldb::eSectionTypeAbsoluteAddress, lldb::eSectionTypeContainer, lldb_private::SectionList::GetSectionAtIndex(), lldb_private::Target::GetSectionLoadList(), lldb_private::SectionList::GetSize(), LLDB_INVALID_ADDRESS, and lldb_private::SectionLoadList::SetSectionLoadAddress().

◆ StripLinkerSymbolAnnotations()

llvm::StringRef ObjectFileELF::StripLinkerSymbolAnnotations ( llvm::StringRef  symbol_name) const
overridevirtual

Reimplemented from lldb_private::ObjectFile.

Definition at line 1644 of file ObjectFileELF.cpp.

◆ Terminate()

void ObjectFileELF::Terminate ( )
static

Definition at line 346 of file ObjectFileELF.cpp.

Referenced by lldb_private::SystemInitializerFull::Terminate().


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