llvm/lld/MachO/Arch/X86_64.cpp

//===- X86_64.cpp ---------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "InputFiles.h"
#include "Symbols.h"
#include "SyntheticSections.h"
#include "Target.h"

#include "lld/Common/ErrorHandler.h"
#include "mach-o/compact_unwind_encoding.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Support/Endian.h"

usingnamespacellvm::MachO;
usingnamespacellvm::support::endian;
usingnamespacelld;
usingnamespacelld::macho;

namespace {

struct X86_64 : TargetInfo {};
} // namespace

static constexpr std::array<RelocAttrs, 10> relocAttrsArray{};

static int pcrelOffset(uint8_t type) {}

int64_t X86_64::getEmbeddedAddend(MemoryBufferRef mb, uint64_t offset,
                                  relocation_info rel) const {}

void X86_64::relocateOne(uint8_t *loc, const Reloc &r, uint64_t value,
                         uint64_t relocVA) const {}

// The following methods emit a number of assembly sequences with RIP-relative
// addressing. Note that RIP-relative addressing on X86-64 has the RIP pointing
// to the next instruction, not the current instruction, so we always have to
// account for the current instruction's size when calculating offsets.
// writeRipRelative helps with that.
//
// bufAddr:  The virtual address corresponding to buf[0].
// bufOff:   The offset within buf of the next instruction.
// destAddr: The destination address that the current instruction references.
static void writeRipRelative(SymbolDiagnostic d, uint8_t *buf, uint64_t bufAddr,
                             uint64_t bufOff, uint64_t destAddr) {}

static constexpr uint8_t stub[] =;

void X86_64::writeStub(uint8_t *buf, const Symbol &sym,
                       uint64_t pointerVA) const {}

static constexpr uint8_t stubHelperHeader[] =;

void X86_64::writeStubHelperHeader(uint8_t *buf) const {}

static constexpr uint8_t stubHelperEntry[] =;

void X86_64::writeStubHelperEntry(uint8_t *buf, const Symbol &sym,
                                  uint64_t entryAddr) const {}

static constexpr uint8_t objcStubsFastCode[] =;

void X86_64::writeObjCMsgSendStub(uint8_t *buf, Symbol *sym, uint64_t stubsAddr,
                                  uint64_t &stubOffset, uint64_t selrefVA,
                                  Symbol *objcMsgSend) const {}

void X86_64::relaxGotLoad(uint8_t *loc, uint8_t type) const {}

X86_64::X86_64() :{}

TargetInfo *macho::createX86_64TargetInfo() {}

void X86_64::handleDtraceReloc(const Symbol *sym, const Reloc &r,
                               uint8_t *loc) const {}