| ... | @@ -456,7 +456,7 @@ const BinaryElfOutput = struct { | ... | @@ -456,7 +456,7 @@ const BinaryElfOutput = struct { |
| 456 | if (phdr.p_type == elf.PT_LOAD) { | 456 | if (phdr.p_type == elf.PT_LOAD) { |
| 457 | const newSegment = try allocator.create(BinaryElfSegment); | 457 | const newSegment = try allocator.create(BinaryElfSegment); |
| 458 | | 458 | |
| 459 | newSegment.physicalAddress = if (phdr.p_paddr != 0) phdr.p_paddr else phdr.p_vaddr; | 459 | newSegment.physicalAddress = phdr.p_paddr; |
| 460 | newSegment.virtualAddress = phdr.p_vaddr; | 460 | newSegment.virtualAddress = phdr.p_vaddr; |
| 461 | newSegment.fileSize = @intCast(phdr.p_filesz); | 461 | newSegment.fileSize = @intCast(phdr.p_filesz); |
| 462 | newSegment.elfOffset = phdr.p_offset; | 462 | newSegment.elfOffset = phdr.p_offset; |