summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/check-addr-offset-align-binary.test
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-objcopy] Fix bug in how segment alignment was being handledJake Ehrlich2017-11-021-0/+40
Just aligning segment offsets to segment alignment is incorrect and also wastes more space than is needed. The requirement is that p_offset == p_addr modulo p_align *not* that p_offset == 0 modulo p_align. Generally speaking we've been using p_addr == 0 modulo p_align. In fact yaml2obj can't even produce a valid situation which causes llvm-objcopy to produce incorrect results because alignment and offset were both inherited from the sections the program header covers. This change fixes this bad behavior in llvm-objcopy. Differential Revision: https://reviews.llvm.org/D39132 llvm-svn: 317284
OpenPOWER on IntegriCloud