Returns the address of the requested section (or an error message in the second element of the pair if the address cannot be found).

Synopsis

Declared in <llvm/ExecutionEngine/RuntimeDyldChecker.h>

std::pair<uint64_t, std::string>
getSectionAddr(
    StringRef FileName,
    StringRef SectionName,
    bool LocalAddress);

Description

if 'LocalAddress' is true, this returns the address of the section within the linker's memory. If 'LocalAddress' is false it returns the address within the target process (i.e. the load address).

Return Value

Pair of section address and empty string on success, or zero and an error message if the address cannot be found.

Parameters

Name

Description

FileName

Object file that contains the section.

SectionName

Name of the section whose address is requested.

LocalAddress

Whether to return the linker‐local address.

Created with MrDocs