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