mirror of
https://github.com/ziglang/zig.git
synced 2024-12-03 18:38:45 +00:00
macho: add machinery for emitting TLV refs
This commit is contained in:
parent
eba280ce20
commit
38ecaf3ab6
@ -613,6 +613,9 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No
|
||||
if (self.dyld_stub_binder_index == null) {
|
||||
self.dyld_stub_binder_index = try self.addUndefined("dyld_stub_binder", .add_got);
|
||||
}
|
||||
if (!self.base.options.single_threaded) {
|
||||
_ = try self.addUndefined("_tlv_bootstrap", .none);
|
||||
}
|
||||
|
||||
try self.createMhExecuteHeaderSymbol();
|
||||
|
||||
|
@ -48,6 +48,7 @@ pub fn isResolvable(self: Relocation, macho_file: *MachO) bool {
|
||||
pub fn getTargetAtomIndex(self: Relocation, macho_file: *MachO) ?Atom.Index {
|
||||
switch (self.type) {
|
||||
.got, .got_page, .got_pageoff => return macho_file.getGotAtomIndexForSymbol(self.target),
|
||||
.tlv, .tlv_page, .tlv_pageoff => return macho_file.getTlvpAtomIndexForSymbol(self.target),
|
||||
else => {},
|
||||
}
|
||||
if (macho_file.getStubsAtomIndexForSymbol(self.target)) |stubs_atom| return stubs_atom;
|
||||
|
Loading…
Reference in New Issue
Block a user