mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Merge pull request #21595 from alexrp/objcopy-seg-paddr
`objcopy`: Use `p_paddr` from `PT_LOAD` even if zero.
This commit is contained in:
commit
e6fd01a949
1 changed files with 1 additions and 1 deletions
|
|
@ -456,7 +456,7 @@ const BinaryElfOutput = struct {
|
|||
if (phdr.p_type == elf.PT_LOAD) {
|
||||
const newSegment = try allocator.create(BinaryElfSegment);
|
||||
|
||||
newSegment.physicalAddress = if (phdr.p_paddr != 0) phdr.p_paddr else phdr.p_vaddr;
|
||||
newSegment.physicalAddress = phdr.p_paddr;
|
||||
newSegment.virtualAddress = phdr.p_vaddr;
|
||||
newSegment.fileSize = @intCast(phdr.p_filesz);
|
||||
newSegment.elfOffset = phdr.p_offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue