003 File Manager
Current Path:
/usr/src/contrib/llvm-project/lld/MachO
usr
/
src
/
contrib
/
llvm-project
/
lld
/
MachO
/
📁
..
📁
Arch
📄
Config.h
(1.82 KB)
📄
Driver.cpp
(13.5 KB)
📄
Driver.h
(984 B)
📄
ExportTrie.cpp
(8.59 KB)
📄
ExportTrie.h
(1.23 KB)
📄
InputFiles.cpp
(16.85 KB)
📄
InputFiles.h
(3.69 KB)
📄
InputSection.cpp
(1.34 KB)
📄
InputSection.h
(1.81 KB)
📄
MachOStructs.h
(1 KB)
📄
MergedOutputSection.cpp
(2.37 KB)
📄
MergedOutputSection.h
(1.68 KB)
📄
Options.td
(53.33 KB)
📄
OutputSection.cpp
(596 B)
📄
OutputSection.h
(2.23 KB)
📄
OutputSegment.cpp
(1.86 KB)
📄
OutputSegment.h
(1.64 KB)
📄
SymbolTable.cpp
(2.35 KB)
📄
SymbolTable.h
(1.29 KB)
📄
Symbols.cpp
(756 B)
📄
Symbols.h
(3.44 KB)
📄
SyntheticSections.cpp
(13.87 KB)
📄
SyntheticSections.h
(9.23 KB)
📄
Target.cpp
(478 B)
📄
Target.h
(2.27 KB)
📄
Writer.cpp
(16.29 KB)
📄
Writer.h
(738 B)
Editing: Target.h
//===- Target.h -------------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLD_MACHO_TARGET_H #define LLD_MACHO_TARGET_H #include "llvm/BinaryFormat/MachO.h" #include "llvm/Support/MemoryBuffer.h" #include <cstddef> #include <cstdint> namespace lld { namespace macho { class Symbol; class DylibSymbol; class InputSection; struct Reloc; enum : uint64_t { // We are currently only supporting 64-bit targets since macOS and iOS are // deprecating 32-bit apps. WordSize = 8, PageSize = 4096, PageZeroSize = 1ull << 32, // XXX should be 4096 for 32-bit targets MaxAlignmentPowerOf2 = 32, }; class TargetInfo { public: virtual ~TargetInfo() = default; // Validate the relocation structure and get its addend. virtual uint64_t getImplicitAddend(llvm::MemoryBufferRef, const llvm::MachO::section_64 &, const llvm::MachO::relocation_info &) const = 0; virtual void relocateOne(uint8_t *loc, const Reloc &, uint64_t val) const = 0; // Write code for lazy binding. See the comments on StubsSection for more // details. virtual void writeStub(uint8_t *buf, const DylibSymbol &) const = 0; virtual void writeStubHelperHeader(uint8_t *buf) const = 0; virtual void writeStubHelperEntry(uint8_t *buf, const DylibSymbol &, uint64_t entryAddr) const = 0; // Symbols may be referenced via either the GOT or the stubs section, // depending on the relocation type. prepareSymbolRelocation() will set up the // GOT/stubs entries, and getSymbolVA() will return the addresses of those // entries. virtual void prepareSymbolRelocation(Symbol &, const InputSection *, const Reloc &) = 0; virtual uint64_t getSymbolVA(const Symbol &, uint8_t type) const = 0; uint32_t cpuType; uint32_t cpuSubtype; size_t stubSize; size_t stubHelperHeaderSize; size_t stubHelperEntrySize; }; TargetInfo *createX86_64TargetInfo(); extern TargetInfo *target; } // namespace macho } // namespace lld #endif
Upload File
Create Folder