| author | |
| committer | |
| log | dd300d92e1c0812520ceffff4bc49529268efbff |
| tree | 55f5822bc13c9a8a7a54d67d80e24a5075978d1f |
| parent | bee35fe3f018dd7b52716f757974ba405266558b |
2 files changed, 3 insertions(+), 2 deletions(-)
src/link/Coff.zig+1-1| ... | @@ -492,8 +492,8 @@ fn growSection(self: *Coff, sect_id: u32, needed_size: u32) !void { | ... | @@ -492,8 +492,8 @@ fn growSection(self: *Coff, sect_id: u32, needed_size: u32) !void { |
| 492 | 492 | ||
| 493 | const sect_vm_capacity = self.allocatedVirtualSize(header.virtual_address); | 493 | const sect_vm_capacity = self.allocatedVirtualSize(header.virtual_address); |
| 494 | if (needed_size > sect_vm_capacity) { | 494 | if (needed_size > sect_vm_capacity) { |
| 495 | try self.growSectionVirtualMemory(sect_id, needed_size); | ||
| 496 | self.markRelocsDirtyByAddress(header.virtual_address + needed_size); | 495 | self.markRelocsDirtyByAddress(header.virtual_address + needed_size); |
| 496 | try self.growSectionVirtualMemory(sect_id, needed_size); | ||
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | header.virtual_size = @max(header.virtual_size, needed_size); | 499 | header.virtual_size = @max(header.virtual_size, needed_size); |
src/link/Coff/Relocation.zig+2-1| ... | @@ -73,7 +73,8 @@ pub fn getTargetAddress(self: Relocation, coff_file: *const Coff) ?u32 { | ... | @@ -73,7 +73,8 @@ pub fn getTargetAddress(self: Relocation, coff_file: *const Coff) ?u32 { |
| 73 | 73 | ||
| 74 | /// Returns true if and only if the reloc is dirty AND the target address is available. | 74 | /// Returns true if and only if the reloc is dirty AND the target address is available. |
| 75 | pub fn isResolvable(self: Relocation, coff_file: *Coff) bool { | 75 | pub fn isResolvable(self: Relocation, coff_file: *Coff) bool { |
| 76 | _ = self.getTargetAddress(coff_file) orelse return false; | 76 | const addr = self.getTargetAddress(coff_file) orelse return false; |
| 77 | if (addr == 0) return false; | ||
| 77 | return self.dirty; | 78 | return self.dirty; |
| 78 | } | 79 | } |
| 79 | 80 |