#ifndef LLD_MACHO_ARCH_ARM64COMMON_H
#define LLD_MACHO_ARCH_ARM64COMMON_H
#include "InputFiles.h"
#include "Symbols.h"
#include "SyntheticSections.h"
#include "Target.h"
#include "llvm/BinaryFormat/MachO.h"
namespace lld::macho {
struct ARM64Common : TargetInfo { … };
inline uint64_t bitField(uint64_t value, int right, int width, int left) { … }
inline void encodeBranch26(uint32_t *loc, const Reloc &r, uint32_t base,
uint64_t va) { … }
inline void encodeBranch26(uint32_t *loc, SymbolDiagnostic d, uint32_t base,
uint64_t va) { … }
inline void encodePage21(uint32_t *loc, const Reloc &r, uint32_t base,
uint64_t va) { … }
inline void encodePage21(uint32_t *loc, SymbolDiagnostic d, uint32_t base,
uint64_t va) { … }
void reportUnalignedLdrStr(void *loc, const Reloc &, uint64_t va, int align);
void reportUnalignedLdrStr(void *loc, SymbolDiagnostic, uint64_t va, int align);
template <typename Target>
inline void encodePageOff12(uint32_t *loc, Target t, uint32_t base,
uint64_t va) { … }
inline uint64_t pageBits(uint64_t address) { … }
inline void writeStub(uint8_t *buf8, const uint32_t stubCode[3],
const macho::Symbol &sym, uint64_t pointerVA) { … }
template <class LP>
inline void writeStubHelperHeader(uint8_t *buf8,
const uint32_t stubHelperHeaderCode[6]) { … }
inline void writeStubHelperEntry(uint8_t *buf8,
const uint32_t stubHelperEntryCode[3],
const Symbol &sym, uint64_t entryVA) { … }
template <class LP>
inline void writeObjCMsgSendFastStub(uint8_t *buf,
const uint32_t objcStubsFastCode[8],
Symbol *sym, uint64_t stubsAddr,
uint64_t stubOffset, uint64_t selrefVA,
uint64_t gotAddr, uint64_t msgSendIndex) { … }
template <class LP>
inline void
writeObjCMsgSendSmallStub(uint8_t *buf, const uint32_t objcStubsSmallCode[3],
Symbol *sym, uint64_t stubsAddr, uint64_t stubOffset,
uint64_t selrefVA, uint64_t msgSendAddr,
uint64_t msgSendIndex) { … }
}
#endif