This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj] - Set the default value for `PAddr` property of a program header to a value of `VAddr`
ClosedPublic

Authored by grimar on Mar 13 2020, 7:15 AM.

Details

Summary

PAddr corresponds to p_paddr of a program header, which is the segment's physical
address for systems in which physical addressing is relevant. p_paddr is often equal
to p_vaddr, which is the virtual address of a segment.

This patch changes the default for PAddr from 0 to a value of VAddr and adds a test.

Diff Detail

Event Timeline

grimar created this revision.Mar 13 2020, 7:15 AM
grimar retitled this revision from [yaml2obj] - Set a default value for `PAddr` property of a program header to a value of `VAddr` to [yaml2obj] - Set the default value for `PAddr` property of a program header to a value of `VAddr`.Mar 13 2020, 7:20 AM
MaskRay accepted this revision.Mar 13 2020, 8:15 AM
This revision is now accepted and ready to land.Mar 13 2020, 8:15 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2020, 8:01 AM

Some post-commit comment comments. Otherwise looks fine.

llvm/test/tools/yaml2obj/ELF/program-header-address.yaml
30

Show what virtual and physical address we set by default for the case where a program header

(same below)

31

has no sections included -> has no sections

41–42

different from a address -> different to the address

43

to the program header's virtual address

grimar marked 4 inline comments as done.Mar 16 2020, 6:09 AM

Some post-commit comment comments. Otherwise looks fine.

Addressed: rG46c34447f8668db43393f0a4b2bfd52a0e9e21dd, thanks!