[PATCH] D41619: [llvm-objcopy] Use physical instead of virtual address when aligning and placing sections in binary

Owen Shaw via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 18:25:14 PST 2018


owenpshaw added inline comments.


================
Comment at: test/tools/llvm-objcopy/binary-paddr.test:35
+    Flags: [ PF_R, PF_W ]
+    VAddr: 0x2000
+    PAddr: 0x1008
----------------
jakehehrlich wrote:
> We don't know where the .data section will end up only that it will have 4-byte alignment It's possible (even quite likely) for the the offset of the .data section (which decides the offset of the program header unfortunately, not the other way around) to be such that the p_offset % p_align != p_vaddr % p_align. This is still not a valid ELF file (at least it isn't assured).
I guess I'm missing something with this alignment stuff.  Having possibly invalid values in the elf doesn't seem to affect what we're testing, but I agree it'd be good to use proper input if possible.  What values would make it valid?


https://reviews.llvm.org/D41619





More information about the llvm-commits mailing list