| ... | ... | @@ -390,7 +390,7 @@ pub fn getDeclVAddr( |
| 390 | 390 | .pcrel = false, |
| 391 | 391 | .has_subtractor = false, |
| 392 | 392 | .length = 3, |
| 393 | | .symbolnum = 0, |
| 393 | .symbolnum = @intCast(sym.nlist_idx), |
| 394 | 394 | }, |
| 395 | 395 | }); |
| 396 | 396 | return vaddr; |
| ... | ... | @@ -416,7 +416,7 @@ pub fn getAnonDeclVAddr( |
| 416 | 416 | .pcrel = false, |
| 417 | 417 | .has_subtractor = false, |
| 418 | 418 | .length = 3, |
| 419 | | .symbolnum = 0, |
| 419 | .symbolnum = @intCast(sym.nlist_idx), |
| 420 | 420 | }, |
| 421 | 421 | }); |
| 422 | 422 | return vaddr; |
| ... | ... | @@ -856,21 +856,18 @@ fn createTlvDescriptor( |
| 856 | 856 | atom.alignment = alignment; |
| 857 | 857 | atom.size = size; |
| 858 | 858 | |
| 859 | | const tlv_bootstrap_index = blk: { |
| 860 | | const index = try self.getGlobalSymbol(macho_file, "_tlv_bootstrap", null); |
| 861 | | break :blk self.symbols.items[index]; |
| 862 | | }; |
| 859 | const tlv_bootstrap_index = try self.getGlobalSymbol(macho_file, "_tlv_bootstrap", null); |
| 863 | 860 | try atom.addReloc(macho_file, .{ |
| 864 | 861 | .tag = .@"extern", |
| 865 | 862 | .offset = 0, |
| 866 | | .target = tlv_bootstrap_index, |
| 863 | .target = self.symbols.items[tlv_bootstrap_index], |
| 867 | 864 | .addend = 0, |
| 868 | 865 | .type = .unsigned, |
| 869 | 866 | .meta = .{ |
| 870 | 867 | .pcrel = false, |
| 871 | 868 | .has_subtractor = false, |
| 872 | 869 | .length = 3, |
| 873 | | .symbolnum = 0, |
| 870 | .symbolnum = @intCast(tlv_bootstrap_index), |
| 874 | 871 | }, |
| 875 | 872 | }); |
| 876 | 873 | try atom.addReloc(macho_file, .{ |
| ... | ... | @@ -883,7 +880,7 @@ fn createTlvDescriptor( |
| 883 | 880 | .pcrel = false, |
| 884 | 881 | .has_subtractor = false, |
| 885 | 882 | .length = 3, |
| 886 | | .symbolnum = 0, |
| 883 | .symbolnum = @intCast(macho_file.getSymbol(init_sym_index).nlist_idx), |
| 887 | 884 | }, |
| 888 | 885 | }); |
| 889 | 886 | |