2020-04-03 02:54:05 +08:00
|
|
|
//===- 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
|
|
|
|
|
2021-04-03 06:46:18 +08:00
|
|
|
#include "MachOStructs.h"
|
2021-03-12 02:28:09 +08:00
|
|
|
#include "Relocations.h"
|
|
|
|
|
2021-01-19 23:44:42 +08:00
|
|
|
#include "llvm/ADT/BitmaskEnum.h"
|
2020-05-16 04:42:28 +08:00
|
|
|
#include "llvm/BinaryFormat/MachO.h"
|
2022-06-13 09:56:45 +08:00
|
|
|
#include "llvm/Support/MathExtras.h"
|
2020-05-16 04:42:28 +08:00
|
|
|
#include "llvm/Support/MemoryBuffer.h"
|
|
|
|
|
[lld-macho] Support calls to functions in dylibs
Summary:
This diff implements lazy symbol binding -- very similar to the PLT
mechanism in ELF.
ELF's .plt section is broken up into two sections in Mach-O:
StubsSection and StubHelperSection. Calls to functions in dylibs will
end up calling into StubsSection, which contains indirect jumps to
addresses stored in the LazyPointerSection (the counterpart to ELF's
.plt.got).
Initially, the LazyPointerSection contains addresses that point into one
of the entry points in the middle of the StubHelperSection. The code in
StubHelperSection will push on the stack an offset into the
LazyBindingSection. The push is followed by a jump to the beginning of
the StubHelperSection (similar to PLT0), which then calls into
dyld_stub_binder. dyld_stub_binder is a non-lazily bound symbol, so this
call looks it up in the GOT.
The stub binder will look up the bind opcodes in the LazyBindingSection
at the given offset. The bind opcodes will tell the binder to update the
address in the LazyPointerSection to point to the symbol, so that
subsequent calls don't have to redo the symbol resolution. The binder
will then jump to the resolved symbol.
Depends on D78269.
Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78270
2020-05-06 08:38:10 +08:00
|
|
|
#include <cstddef>
|
2020-04-03 02:54:05 +08:00
|
|
|
#include <cstdint>
|
|
|
|
|
2022-08-07 22:37:49 +08:00
|
|
|
namespace lld::macho {
|
2021-01-19 23:44:42 +08:00
|
|
|
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
|
2020-04-03 02:54:05 +08:00
|
|
|
|
2020-06-14 11:00:06 +08:00
|
|
|
class Symbol;
|
2021-03-30 08:33:48 +08:00
|
|
|
class Defined;
|
[lld-macho] Support calls to functions in dylibs
Summary:
This diff implements lazy symbol binding -- very similar to the PLT
mechanism in ELF.
ELF's .plt section is broken up into two sections in Mach-O:
StubsSection and StubHelperSection. Calls to functions in dylibs will
end up calling into StubsSection, which contains indirect jumps to
addresses stored in the LazyPointerSection (the counterpart to ELF's
.plt.got).
Initially, the LazyPointerSection contains addresses that point into one
of the entry points in the middle of the StubHelperSection. The code in
StubHelperSection will push on the stack an offset into the
LazyBindingSection. The push is followed by a jump to the beginning of
the StubHelperSection (similar to PLT0), which then calls into
dyld_stub_binder. dyld_stub_binder is a non-lazily bound symbol, so this
call looks it up in the GOT.
The stub binder will look up the bind opcodes in the LazyBindingSection
at the given offset. The bind opcodes will tell the binder to update the
address in the LazyPointerSection to point to the symbol, so that
subsequent calls don't have to redo the symbol resolution. The binder
will then jump to the resolved symbol.
Depends on D78269.
Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78270
2020-05-06 08:38:10 +08:00
|
|
|
class DylibSymbol;
|
2020-05-16 04:42:28 +08:00
|
|
|
class InputSection;
|
2022-06-17 23:21:59 +08:00
|
|
|
class ConcatInputSection;
|
[lld-macho] Support calls to functions in dylibs
Summary:
This diff implements lazy symbol binding -- very similar to the PLT
mechanism in ELF.
ELF's .plt section is broken up into two sections in Mach-O:
StubsSection and StubHelperSection. Calls to functions in dylibs will
end up calling into StubsSection, which contains indirect jumps to
addresses stored in the LazyPointerSection (the counterpart to ELF's
.plt.got).
Initially, the LazyPointerSection contains addresses that point into one
of the entry points in the middle of the StubHelperSection. The code in
StubHelperSection will push on the stack an offset into the
LazyBindingSection. The push is followed by a jump to the beginning of
the StubHelperSection (similar to PLT0), which then calls into
dyld_stub_binder. dyld_stub_binder is a non-lazily bound symbol, so this
call looks it up in the GOT.
The stub binder will look up the bind opcodes in the LazyBindingSection
at the given offset. The bind opcodes will tell the binder to update the
address in the LazyPointerSection to point to the symbol, so that
subsequent calls don't have to redo the symbol resolution. The binder
will then jump to the resolved symbol.
Depends on D78269.
Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78270
2020-05-06 08:38:10 +08:00
|
|
|
|
2020-04-03 02:54:05 +08:00
|
|
|
class TargetInfo {
|
|
|
|
public:
|
2021-04-03 06:46:18 +08:00
|
|
|
template <class LP> TargetInfo(LP) {
|
|
|
|
// Having these values available in TargetInfo allows us to access them
|
|
|
|
// without having to resort to templates.
|
2021-05-04 06:31:23 +08:00
|
|
|
magic = LP::magic;
|
2021-04-03 06:46:18 +08:00
|
|
|
pageZeroSize = LP::pageZeroSize;
|
2021-05-04 06:31:23 +08:00
|
|
|
headerSize = sizeof(typename LP::mach_header);
|
2021-04-03 06:46:18 +08:00
|
|
|
wordSize = LP::wordSize;
|
2022-06-13 09:56:45 +08:00
|
|
|
p2WordSize = llvm::CTLog2<LP::wordSize>();
|
2021-04-03 06:46:18 +08:00
|
|
|
}
|
|
|
|
|
2020-04-03 02:54:05 +08:00
|
|
|
virtual ~TargetInfo() = default;
|
2020-05-19 23:53:53 +08:00
|
|
|
|
2020-05-16 04:42:28 +08:00
|
|
|
// Validate the relocation structure and get its addend.
|
2021-03-13 06:26:11 +08:00
|
|
|
virtual int64_t
|
2021-04-03 06:46:18 +08:00
|
|
|
getEmbeddedAddend(llvm::MemoryBufferRef, uint64_t offset,
|
2021-01-19 23:44:42 +08:00
|
|
|
const llvm::MachO::relocation_info) const = 0;
|
|
|
|
virtual void relocateOne(uint8_t *loc, const Reloc &, uint64_t va,
|
2021-03-12 02:28:11 +08:00
|
|
|
uint64_t relocVA) const = 0;
|
2020-04-03 02:54:05 +08:00
|
|
|
|
[lld-macho] Support calls to functions in dylibs
Summary:
This diff implements lazy symbol binding -- very similar to the PLT
mechanism in ELF.
ELF's .plt section is broken up into two sections in Mach-O:
StubsSection and StubHelperSection. Calls to functions in dylibs will
end up calling into StubsSection, which contains indirect jumps to
addresses stored in the LazyPointerSection (the counterpart to ELF's
.plt.got).
Initially, the LazyPointerSection contains addresses that point into one
of the entry points in the middle of the StubHelperSection. The code in
StubHelperSection will push on the stack an offset into the
LazyBindingSection. The push is followed by a jump to the beginning of
the StubHelperSection (similar to PLT0), which then calls into
dyld_stub_binder. dyld_stub_binder is a non-lazily bound symbol, so this
call looks it up in the GOT.
The stub binder will look up the bind opcodes in the LazyBindingSection
at the given offset. The bind opcodes will tell the binder to update the
address in the LazyPointerSection to point to the symbol, so that
subsequent calls don't have to redo the symbol resolution. The binder
will then jump to the resolved symbol.
Depends on D78269.
Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78270
2020-05-06 08:38:10 +08:00
|
|
|
// Write code for lazy binding. See the comments on StubsSection for more
|
|
|
|
// details.
|
2020-08-28 06:54:42 +08:00
|
|
|
virtual void writeStub(uint8_t *buf, const Symbol &) const = 0;
|
[lld-macho] Support calls to functions in dylibs
Summary:
This diff implements lazy symbol binding -- very similar to the PLT
mechanism in ELF.
ELF's .plt section is broken up into two sections in Mach-O:
StubsSection and StubHelperSection. Calls to functions in dylibs will
end up calling into StubsSection, which contains indirect jumps to
addresses stored in the LazyPointerSection (the counterpart to ELF's
.plt.got).
Initially, the LazyPointerSection contains addresses that point into one
of the entry points in the middle of the StubHelperSection. The code in
StubHelperSection will push on the stack an offset into the
LazyBindingSection. The push is followed by a jump to the beginning of
the StubHelperSection (similar to PLT0), which then calls into
dyld_stub_binder. dyld_stub_binder is a non-lazily bound symbol, so this
call looks it up in the GOT.
The stub binder will look up the bind opcodes in the LazyBindingSection
at the given offset. The bind opcodes will tell the binder to update the
address in the LazyPointerSection to point to the symbol, so that
subsequent calls don't have to redo the symbol resolution. The binder
will then jump to the resolved symbol.
Depends on D78269.
Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78270
2020-05-06 08:38:10 +08:00
|
|
|
virtual void writeStubHelperHeader(uint8_t *buf) const = 0;
|
2022-03-15 09:51:11 +08:00
|
|
|
virtual void writeStubHelperEntry(uint8_t *buf, const Symbol &,
|
[lld-macho] Support calls to functions in dylibs
Summary:
This diff implements lazy symbol binding -- very similar to the PLT
mechanism in ELF.
ELF's .plt section is broken up into two sections in Mach-O:
StubsSection and StubHelperSection. Calls to functions in dylibs will
end up calling into StubsSection, which contains indirect jumps to
addresses stored in the LazyPointerSection (the counterpart to ELF's
.plt.got).
Initially, the LazyPointerSection contains addresses that point into one
of the entry points in the middle of the StubHelperSection. The code in
StubHelperSection will push on the stack an offset into the
LazyBindingSection. The push is followed by a jump to the beginning of
the StubHelperSection (similar to PLT0), which then calls into
dyld_stub_binder. dyld_stub_binder is a non-lazily bound symbol, so this
call looks it up in the GOT.
The stub binder will look up the bind opcodes in the LazyBindingSection
at the given offset. The bind opcodes will tell the binder to update the
address in the LazyPointerSection to point to the symbol, so that
subsequent calls don't have to redo the symbol resolution. The binder
will then jump to the resolved symbol.
Depends on D78269.
Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78270
2020-05-06 08:38:10 +08:00
|
|
|
uint64_t entryAddr) const = 0;
|
|
|
|
|
[lld-macho] Add support for objc_msgSend stubs
Apple Clang in Xcode 14 introduced a new feature for reducing the
overhead of objc_msgSend calls by deduplicating the setup calls for each
individual selector. This works by clang adding undefined symbols for
each selector called in a translation unit, such as `_objc_msgSend$foo`
for calling the `foo` method on any `NSObject`. There are 2
different modes for this behavior, the default directly does the setup
for `_objc_msgSend` and calls it, and the smaller option does the
selector setup, and then calls the standard `_objc_msgSend` stub
function.
The general overview of how this works is:
- Undefined symbols with the given prefix are collected
- The suffix of each matching undefined symbol is added as a string to
`__objc_methname`
- A pointer is added for every method name in the `__objc_selrefs`
section
- A `got` entry is emitted for `_objc_msgSend`
- Stubs are emitting pointing to the synthesized locations
Notes:
- Both `__objc_methname` and `__objc_selrefs` can also exist from object
files, so their contents are merged with our synthesized contents
- The compiler emits method names for defined methods, but not for
undefined symbols you call, but stubs are used for both
- This only implements the default "fast" mode currently just to reduce
the diff, I also doubt many folks will care to swap modes
- This only implements this for arm64 and x86_64, we don't need to
implement this for 32 bit iOS archs, but we should implement it for
watchOS archs in a later diff
Differential Revision: https://reviews.llvm.org/D128108
2022-06-17 12:35:18 +08:00
|
|
|
virtual void writeObjCMsgSendStub(uint8_t *buf, Symbol *sym,
|
|
|
|
uint64_t stubsAddr, uint64_t stubOffset,
|
|
|
|
uint64_t selrefsVA, uint64_t selectorIndex,
|
|
|
|
uint64_t gotAddr,
|
|
|
|
uint64_t msgSendIndex) const = 0;
|
|
|
|
|
2020-06-14 11:00:06 +08:00
|
|
|
// Symbols may be referenced via either the GOT or the stubs section,
|
|
|
|
// depending on the relocation type. prepareSymbolRelocation() will set up the
|
2020-08-08 02:04:52 +08:00
|
|
|
// GOT/stubs entries, and resolveSymbolVA() will return the addresses of those
|
|
|
|
// entries. resolveSymbolVA() may also relax the target instructions to save
|
|
|
|
// on a level of address indirection.
|
2021-01-19 23:44:42 +08:00
|
|
|
virtual void relaxGotLoad(uint8_t *loc, uint8_t type) const = 0;
|
|
|
|
|
2020-09-27 04:00:22 +08:00
|
|
|
virtual uint64_t getPageSize() const = 0;
|
|
|
|
|
2021-03-30 08:33:48 +08:00
|
|
|
virtual void populateThunk(InputSection *thunk, Symbol *funcSym) {
|
|
|
|
llvm_unreachable("target does not use thunks");
|
|
|
|
}
|
|
|
|
|
2022-07-18 19:37:40 +08:00
|
|
|
const RelocAttrs &getRelocAttrs(uint8_t type) const {
|
|
|
|
assert(type < relocAttrs.size() && "invalid relocation type");
|
|
|
|
if (type >= relocAttrs.size())
|
|
|
|
return invalidRelocAttrs;
|
|
|
|
return relocAttrs[type];
|
|
|
|
}
|
|
|
|
|
2021-01-19 23:44:42 +08:00
|
|
|
bool hasAttr(uint8_t type, RelocAttrBits bit) const {
|
|
|
|
return getRelocAttrs(type).hasAttr(bit);
|
|
|
|
}
|
|
|
|
|
2021-03-30 08:33:48 +08:00
|
|
|
bool usesThunks() const { return thunkSize > 0; }
|
|
|
|
|
2022-07-12 03:21:57 +08:00
|
|
|
// For now, handleDtraceReloc only implements -no_dtrace_dof, and ensures
|
|
|
|
// that the linking would not fail even when there are user-provided dtrace
|
|
|
|
// symbols. However, unlike ld64, lld currently does not emit __dof sections.
|
|
|
|
virtual void handleDtraceReloc(const Symbol *sym, const Reloc &r,
|
|
|
|
uint8_t *loc) const {
|
|
|
|
llvm_unreachable("Unsupported architecture for dtrace symbols");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-06-17 23:21:59 +08:00
|
|
|
virtual void applyOptimizationHints(uint8_t *buf, const ConcatInputSection *,
|
|
|
|
llvm::ArrayRef<uint64_t>) const {};
|
|
|
|
|
2021-05-04 06:31:23 +08:00
|
|
|
uint32_t magic;
|
2021-05-11 03:45:20 +08:00
|
|
|
llvm::MachO::CPUType cpuType;
|
2020-04-03 02:54:05 +08:00
|
|
|
uint32_t cpuSubtype;
|
[lld-macho] Support calls to functions in dylibs
Summary:
This diff implements lazy symbol binding -- very similar to the PLT
mechanism in ELF.
ELF's .plt section is broken up into two sections in Mach-O:
StubsSection and StubHelperSection. Calls to functions in dylibs will
end up calling into StubsSection, which contains indirect jumps to
addresses stored in the LazyPointerSection (the counterpart to ELF's
.plt.got).
Initially, the LazyPointerSection contains addresses that point into one
of the entry points in the middle of the StubHelperSection. The code in
StubHelperSection will push on the stack an offset into the
LazyBindingSection. The push is followed by a jump to the beginning of
the StubHelperSection (similar to PLT0), which then calls into
dyld_stub_binder. dyld_stub_binder is a non-lazily bound symbol, so this
call looks it up in the GOT.
The stub binder will look up the bind opcodes in the LazyBindingSection
at the given offset. The bind opcodes will tell the binder to update the
address in the LazyPointerSection to point to the symbol, so that
subsequent calls don't have to redo the symbol resolution. The binder
will then jump to the resolved symbol.
Depends on D78269.
Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78270
2020-05-06 08:38:10 +08:00
|
|
|
|
2021-04-03 23:10:45 +08:00
|
|
|
uint64_t pageZeroSize;
|
2021-05-04 06:31:23 +08:00
|
|
|
size_t headerSize;
|
2021-04-03 23:58:23 +08:00
|
|
|
size_t stubSize;
|
|
|
|
size_t stubHelperHeaderSize;
|
|
|
|
size_t stubHelperEntrySize;
|
[lld-macho] Add support for objc_msgSend stubs
Apple Clang in Xcode 14 introduced a new feature for reducing the
overhead of objc_msgSend calls by deduplicating the setup calls for each
individual selector. This works by clang adding undefined symbols for
each selector called in a translation unit, such as `_objc_msgSend$foo`
for calling the `foo` method on any `NSObject`. There are 2
different modes for this behavior, the default directly does the setup
for `_objc_msgSend` and calls it, and the smaller option does the
selector setup, and then calls the standard `_objc_msgSend` stub
function.
The general overview of how this works is:
- Undefined symbols with the given prefix are collected
- The suffix of each matching undefined symbol is added as a string to
`__objc_methname`
- A pointer is added for every method name in the `__objc_selrefs`
section
- A `got` entry is emitted for `_objc_msgSend`
- Stubs are emitting pointing to the synthesized locations
Notes:
- Both `__objc_methname` and `__objc_selrefs` can also exist from object
files, so their contents are merged with our synthesized contents
- The compiler emits method names for defined methods, but not for
undefined symbols you call, but stubs are used for both
- This only implements the default "fast" mode currently just to reduce
the diff, I also doubt many folks will care to swap modes
- This only implements this for arm64 and x86_64, we don't need to
implement this for 32 bit iOS archs, but we should implement it for
watchOS archs in a later diff
Differential Revision: https://reviews.llvm.org/D128108
2022-06-17 12:35:18 +08:00
|
|
|
size_t objcStubsFastSize;
|
|
|
|
size_t objcStubsAlignment;
|
2022-06-13 09:56:45 +08:00
|
|
|
uint8_t p2WordSize;
|
2021-04-03 23:58:23 +08:00
|
|
|
size_t wordSize;
|
2021-03-30 08:33:48 +08:00
|
|
|
|
|
|
|
size_t thunkSize = 0;
|
2021-08-30 03:19:19 +08:00
|
|
|
uint64_t forwardBranchRange = 0;
|
|
|
|
uint64_t backwardBranchRange = 0;
|
2021-03-30 08:33:48 +08:00
|
|
|
|
2022-06-13 09:56:45 +08:00
|
|
|
uint32_t modeDwarfEncoding;
|
|
|
|
uint8_t subtractorRelocType;
|
|
|
|
uint8_t unsignedRelocType;
|
|
|
|
|
2022-07-18 19:37:40 +08:00
|
|
|
llvm::ArrayRef<RelocAttrs> relocAttrs;
|
|
|
|
|
2021-03-30 08:33:48 +08:00
|
|
|
// We contrive this value as sufficiently far from any valid address that it
|
|
|
|
// will always be out-of-range for any architecture. UINT64_MAX is not a
|
|
|
|
// good choice because it is (a) only 1 away from wrapping to 0, and (b) the
|
|
|
|
// tombstone value for DenseMap<> and caused weird assertions for me.
|
|
|
|
static constexpr uint64_t outOfRangeVA = 0xfull << 60;
|
2020-04-03 02:54:05 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
TargetInfo *createX86_64TargetInfo();
|
2020-09-27 04:00:22 +08:00
|
|
|
TargetInfo *createARM64TargetInfo();
|
2021-04-16 09:14:32 +08:00
|
|
|
TargetInfo *createARM64_32TargetInfo();
|
2021-05-01 04:17:25 +08:00
|
|
|
TargetInfo *createARMTargetInfo(uint32_t cpuSubtype);
|
2020-04-03 02:54:05 +08:00
|
|
|
|
2021-04-03 06:46:18 +08:00
|
|
|
struct LP64 {
|
|
|
|
using mach_header = llvm::MachO::mach_header_64;
|
|
|
|
using nlist = structs::nlist_64;
|
|
|
|
using segment_command = llvm::MachO::segment_command_64;
|
|
|
|
using section = llvm::MachO::section_64;
|
2021-04-22 01:35:12 +08:00
|
|
|
using encryption_info_command = llvm::MachO::encryption_info_command_64;
|
2021-04-03 06:46:18 +08:00
|
|
|
|
|
|
|
static constexpr uint32_t magic = llvm::MachO::MH_MAGIC_64;
|
|
|
|
static constexpr uint32_t segmentLCType = llvm::MachO::LC_SEGMENT_64;
|
2021-04-22 01:35:12 +08:00
|
|
|
static constexpr uint32_t encryptionInfoLCType =
|
|
|
|
llvm::MachO::LC_ENCRYPTION_INFO_64;
|
2021-04-03 06:46:18 +08:00
|
|
|
|
2021-04-03 23:10:45 +08:00
|
|
|
static constexpr uint64_t pageZeroSize = 1ull << 32;
|
2021-04-03 23:58:23 +08:00
|
|
|
static constexpr size_t wordSize = 8;
|
2021-04-03 06:46:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ILP32 {
|
|
|
|
using mach_header = llvm::MachO::mach_header;
|
|
|
|
using nlist = structs::nlist;
|
|
|
|
using segment_command = llvm::MachO::segment_command;
|
|
|
|
using section = llvm::MachO::section;
|
2021-04-22 01:35:12 +08:00
|
|
|
using encryption_info_command = llvm::MachO::encryption_info_command;
|
2021-04-03 06:46:18 +08:00
|
|
|
|
|
|
|
static constexpr uint32_t magic = llvm::MachO::MH_MAGIC;
|
|
|
|
static constexpr uint32_t segmentLCType = llvm::MachO::LC_SEGMENT;
|
2021-04-22 01:35:12 +08:00
|
|
|
static constexpr uint32_t encryptionInfoLCType =
|
|
|
|
llvm::MachO::LC_ENCRYPTION_INFO;
|
2021-04-03 06:46:18 +08:00
|
|
|
|
2021-04-03 23:10:45 +08:00
|
|
|
static constexpr uint64_t pageZeroSize = 1ull << 12;
|
2021-04-03 23:58:23 +08:00
|
|
|
static constexpr size_t wordSize = 4;
|
2021-04-03 06:46:18 +08:00
|
|
|
};
|
|
|
|
|
2020-04-03 02:54:05 +08:00
|
|
|
extern TargetInfo *target;
|
|
|
|
|
2022-08-07 22:37:49 +08:00
|
|
|
} // namespace lld::macho
|
2020-04-03 02:54:05 +08:00
|
|
|
|
|
|
|
#endif
|