Lines Matching defs:BinaryContext

1 //===- bolt/Core/BinaryContext.cpp - Low-level context --------------------===//
9 // This file implements the BinaryContext class.
13 #include "bolt/Core/BinaryContext.h"
114 void BinaryContext::logBOLTErrorsAndQuitOnFatal(Error E) {
123 BinaryContext::BinaryContext(std::unique_ptr<MCContext> Ctx,
150 BinaryContext::~BinaryContext() {
160 /// Create BinaryContext for a given architecture \p ArchName and
162 Expected<std::unique_ptr<BinaryContext>> BinaryContext::createBinaryContext(
286 auto BC = std::make_unique<BinaryContext>(
313 bool BinaryContext::forceSymbolRelocations(StringRef SymbolName) const {
329 BinaryContext::createObjectWriter(raw_pwrite_stream &OS) {
333 bool BinaryContext::validateObjectNesting() const {
356 bool BinaryContext::validateHoles() const {
380 void BinaryContext::updateObjectNesting(BinaryDataMapType::iterator GAI) {
423 iterator_range<BinaryContext::binary_data_iterator>
424 BinaryContext::getSubBinaryData(BinaryData *BD) {
433 BinaryContext::handleAddressRef(uint64_t Address, BinaryFunction &BF,
514 MemoryContentsType BinaryContext::analyzeMemoryAt(uint64_t Address,
552 bool BinaryContext::analyzeJumpTable(const uint64_t Address,
698 void BinaryContext::populateJumpTables() {
772 void BinaryContext::skipMarkedFragments() {
802 MCSymbol *BinaryContext::getOrCreateGlobalSymbol(uint64_t Address, Twine Prefix,
817 MCSymbol *BinaryContext::getOrCreateUndefinedGlobalSymbol(StringRef Name) {
821 BinaryFunction *BinaryContext::createBinaryFunction(
835 BinaryContext::getOrCreateJumpTable(BinaryFunction &Function, uint64_t Address,
902 BinaryContext::duplicateJumpTable(BinaryFunction &Function, JumpTable *JT,
933 std::string BinaryContext::generateJumpTableName(const BinaryFunction &BF,
953 bool BinaryContext::hasValidCodePadding(const BinaryFunction &BF) {
1037 void BinaryContext::adjustCodePadding() {
1057 MCSymbol *BinaryContext::registerNameAtAddress(StringRef Name, uint64_t Address,
1088 BinaryContext::getBinaryDataContainingAddressImpl(uint64_t Address) const {
1107 BinaryData *BinaryContext::getGOTSymbol() {
1132 bool BinaryContext::setBinaryDataSize(uint64_t Address, uint64_t Size) {
1154 void BinaryContext::generateSymbolHashes() {
1215 bool BinaryContext::registerFragment(BinaryFunction &TargetFunction,
1234 void BinaryContext::addAdrpAddRelocAArch64(BinaryFunction &BF,
1249 bool BinaryContext::handleAArch64Veneer(uint64_t Address, bool MatchOnly) {
1327 void BinaryContext::processInterproceduralReferences() {
1399 void BinaryContext::postProcessSymbolTable() {
1418 void BinaryContext::foldFunction(BinaryFunction &ChildBF,
1480 void BinaryContext::fixBinaryDataHoles() {
1534 void BinaryContext::printGlobalSymbols(raw_ostream &OS) const {
1568 Expected<unsigned> BinaryContext::getDwarfFile(
1577 unsigned BinaryContext::addDebugFilenameToUnit(const uint32_t DestCUID,
1607 std::vector<BinaryFunction *> BinaryContext::getSortedFunctions() {
1617 std::vector<BinaryFunction *> BinaryContext::getAllBinaryFunctions() {
1628 std::optional<DWARFUnit *> BinaryContext::getDWOCU(uint64_t DWOId) {
1636 DWARFContext *BinaryContext::getDWOContext() const {
1643 void BinaryContext::preprocessDWODebugInfo() {
1673 void BinaryContext::preprocessDebugInfo() {
1803 bool BinaryContext::shouldEmit(const BinaryFunction &Function) const {
1818 void BinaryContext::dump(const MCInst &Inst) const {
1827 void BinaryContext::printCFI(raw_ostream &OS, const MCCFIInstruction &Inst) {
1882 MarkerSymType BinaryContext::getMarkerType(const SymbolRef &Symbol) const {
1911 bool BinaryContext::isMarker(const SymbolRef &Symbol) const {
1945 void BinaryContext::printInstruction(raw_ostream &OS, const MCInst &Instruction,
2024 BinaryContext::getBaseAddressForMapping(uint64_t MMapAddress,
2059 ErrorOr<BinarySection &> BinaryContext::getSectionForAddress(uint64_t Address) {
2073 BinaryContext::getSectionNameForAddress(uint64_t Address) const {
2079 BinarySection &BinaryContext::registerSection(BinarySection *Section) {
2097 BinarySection &BinaryContext::registerSection(SectionRef Section) {
2102 BinaryContext::registerSection(const Twine &SectionName,
2109 BinaryContext::registerOrUpdateSection(const Twine &Name, unsigned ELFType,
2134 void BinaryContext::deregisterSectionName(const BinarySection &Section) {
2145 void BinaryContext::deregisterUnusedSections() {
2165 bool BinaryContext::deregisterSection(BinarySection &Section) {
2186 void BinaryContext::renameSection(BinarySection &Section,
2203 void BinaryContext::printSections(raw_ostream &OS) const {
2208 BinarySection &BinaryContext::absoluteSection() {
2214 ErrorOr<uint64_t> BinaryContext::getUnsignedValueAtAddress(uint64_t Address,
2229 ErrorOr<int64_t> BinaryContext::getSignedValueAtAddress(uint64_t Address,
2244 void BinaryContext::addRelocation(uint64_t Address, MCSymbol *Symbol,
2253 void BinaryContext::addDynamicRelocation(uint64_t Address, MCSymbol *Symbol,
2262 bool BinaryContext::removeRelocationAt(uint64_t Address) {
2268 const Relocation *BinaryContext::getRelocationAt(uint64_t Address) const {
2277 BinaryContext::getDynamicRelocationAt(uint64_t Address) const {
2285 void BinaryContext::markAmbiguousRelocations(BinaryData &BD,
2316 BinaryFunction *BinaryContext::getFunctionForSymbol(const MCSymbol *Symbol,
2331 BinaryContext::generateBugReportMessage(StringRef Message,
2353 BinaryContext::createInjectedBinaryFunction(const std::string &Name,
2363 BinaryContext::calculateEmittedSize(BinaryFunction &BF, bool FixBranches) {
2461 bool BinaryContext::validateInstructionEncoding(
2486 uint64_t BinaryContext::getHotThreshold() const {
2496 BinaryFunction *BinaryContext::getBinaryFunctionContainingAddress(
2512 BinaryFunction *BinaryContext::getBinaryFunctionAtAddress(uint64_t Address) {
2534 void BinaryContext::deleteJumpTable(uint64_t Address) {
2543 DebugAddressRangesVector BinaryContext::translateModuleAddressRanges(