| ... | ... | @@ -416,7 +416,7 @@ pub fn write(macho_file: *MachO, buffer: []u8) void { |
| 416 | 416 | { |
| 417 | 417 | const offset = fde.out_offset + 8; |
| 418 | 418 | const saddr = sect.addr + offset; |
| 419 | | const taddr = fde.getAtom(macho_file).value; |
| 419 | const taddr = fde.getAtom(macho_file).getAddress(macho_file); |
| 420 | 420 | std.mem.writeInt( |
| 421 | 421 | i64, |
| 422 | 422 | buffer[offset..][0..8], |
| ... | ... | @@ -428,7 +428,7 @@ pub fn write(macho_file: *MachO, buffer: []u8) void { |
| 428 | 428 | if (fde.getLsdaAtom(macho_file)) |atom| { |
| 429 | 429 | const offset = fde.out_offset + fde.lsda_ptr_offset; |
| 430 | 430 | const saddr = sect.addr + offset; |
| 431 | | const taddr = atom.value + fde.lsda_offset; |
| 431 | const taddr = atom.getAddress(macho_file) + fde.lsda_offset; |
| 432 | 432 | switch (fde.getCie(macho_file).lsda_size.?) { |
| 433 | 433 | .p32 => std.mem.writeInt( |
| 434 | 434 | i32, |
| ... | ... | @@ -501,7 +501,7 @@ pub fn writeRelocs(macho_file: *MachO, code: []u8, relocs: *std.ArrayList(macho. |
| 501 | 501 | { |
| 502 | 502 | const offset = fde.out_offset + 8; |
| 503 | 503 | const saddr = sect.addr + offset; |
| 504 | | const taddr = fde.getAtom(macho_file).value; |
| 504 | const taddr = fde.getAtom(macho_file).getAddress(macho_file); |
| 505 | 505 | std.mem.writeInt( |
| 506 | 506 | i64, |
| 507 | 507 | code[offset..][0..8], |
| ... | ... | @@ -513,7 +513,7 @@ pub fn writeRelocs(macho_file: *MachO, code: []u8, relocs: *std.ArrayList(macho. |
| 513 | 513 | if (fde.getLsdaAtom(macho_file)) |atom| { |
| 514 | 514 | const offset = fde.out_offset + fde.lsda_ptr_offset; |
| 515 | 515 | const saddr = sect.addr + offset; |
| 516 | | const taddr = atom.value + fde.lsda_offset; |
| 516 | const taddr = atom.getAddress(macho_file) + fde.lsda_offset; |
| 517 | 517 | switch (fde.getCie(macho_file).lsda_size.?) { |
| 518 | 518 | .p32 => std.mem.writeInt( |
| 519 | 519 | i32, |