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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 03:25:15 PST 2018


jhenderson added a comment.

In https://reviews.llvm.org/D41619#970577, @owenpshaw wrote:

> basic-align-copy.test - Uses binary output in the test.  Should it change to using elf output?  Or was it intended to test binary alignment, which we're now changing?


Yes, this was intended for testing binary alignment (see https://reviews.llvm.org/D34480, which added support for binary output). The key feature of the test is that the second section needs to be aligned, based on it's address alignment, so this can change as we change the behaviour.

> two-seg-remove-end.test, two-seg-remove-first.test, two-seg-remove-third-sec.test - All use binary output, but define two segments with identical PAddr, so they're output on top of each other using this new offset logic.   Do we actually want to test identical PAddrs, or is that just an oversight in the test that didn't matter before?  Should these tests use binary output, or change to elf?

I feel like this is a mistake in the tests - the virtual and physical address of each segment should be different (note that the sections assigned to them have specific addresses themselves), but please wait for Jake to confirm.


https://reviews.llvm.org/D41619





More information about the llvm-commits mailing list