#include "Writer.h"
#include "ConcatOutputSection.h"
#include "Config.h"
#include "InputFiles.h"
#include "InputSection.h"
#include "MapFile.h"
#include "OutputSection.h"
#include "OutputSegment.h"
#include "SectionPriorities.h"
#include "SymbolTable.h"
#include "Symbols.h"
#include "SyntheticSections.h"
#include "Target.h"
#include "UnwindInfoSection.h"
#include "lld/Common/Arrays.h"
#include "lld/Common/CommonLinkerContext.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/Parallel.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/thread.h"
#include "llvm/Support/xxhash.h"
#include <algorithm>
usingnamespacellvm;
usingnamespacellvm::MachO;
usingnamespacellvm::sys;
usingnamespacelld;
usingnamespacelld::macho;
namespace {
class LCUuid;
class Writer { … };
class LCDyldInfo final : public LoadCommand { … };
class LCSubFramework final : public LoadCommand { … };
class LCFunctionStarts final : public LoadCommand { … };
class LCDataInCode final : public LoadCommand { … };
class LCDysymtab final : public LoadCommand { … };
template <class LP> class LCSegment final : public LoadCommand { … };
class LCMain final : public LoadCommand { … };
class LCSymtab final : public LoadCommand { … };
class LCDylib final : public LoadCommand { … };
uint32_t LCDylib::instanceCount = …;
class LCLoadDylinker final : public LoadCommand { … };
class LCRPath final : public LoadCommand { … };
class LCDyldEnv final : public LoadCommand { … };
class LCMinVersion final : public LoadCommand { … };
class LCBuildVersion final : public LoadCommand { … };
class LCUuid final : public LoadCommand { … };
template <class LP> class LCEncryptionInfo final : public LoadCommand { … };
class LCCodeSignature final : public LoadCommand { … };
class LCExportsTrie final : public LoadCommand { … };
class LCChainedFixups final : public LoadCommand { … };
}
void Writer::treatSpecialUndefineds() { … }
static void prepareSymbolRelocation(Symbol *sym, const InputSection *isec,
const lld::macho::Reloc &r) { … }
void Writer::scanRelocations() { … }
static void addNonWeakDefinition(const Defined *defined) { … }
void Writer::scanSymbols() { … }
static bool useLCBuildVersion(const PlatformInfo &platformInfo) { … }
template <class LP> void Writer::createLoadCommands() { … }
static void sortSegmentsAndSections() { … }
template <class LP> void Writer::createOutputSections() { … }
void Writer::finalizeAddresses() { … }
void Writer::finalizeLinkEditSegment() { … }
void Writer::assignAddresses(OutputSegment *seg) { … }
void Writer::openFile() { … }
void Writer::writeSections() { … }
void Writer::applyOptimizationHints() { … }
void Writer::writeUuid() { … }
void Writer::buildFixupChains() { … }
void Writer::writeCodeSignature() { … }
void Writer::writeOutputFile() { … }
template <class LP> void Writer::run() { … }
template <class LP> void macho::writeResult() { … }
void macho::resetWriter() { … }
void macho::createSyntheticSections() { … }
OutputSection *macho::firstTLVDataSection = …;
template void macho::writeResult<LP64>();
template void macho::writeResult<ILP32>();