summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-09-10 09:16:34 +0000
committerFangrui Song <maskray@google.com>2019-09-10 09:16:34 +0000
commit1da4f47195c2e5e4faaaca265ae2f9d9149b85df (patch)
treecef5384c45484dda05acf3b8469f653287c218df /llvm/lib/CodeGen/TargetPassConfig.cpp
parent3565c6b15c5466d6945fe82eae3e2d8df29d6622 (diff)
downloadbcm5719-llvm-1da4f47195c2e5e4faaaca265ae2f9d9149b85df.tar.gz
bcm5719-llvm-1da4f47195c2e5e4faaaca265ae2f9d9149b85df.zip
[yaml2obj] Set p_align to the maximum sh_addralign of contained sections
The address difference between two sections in a PT_LOAD is a constant. Consider a hypothetical case (pagesize can be very small, say, 4). ``` .text sh_addralign=4 .text.hot sh_addralign=16 ``` If we set p_align to 4, the PT_LOAD will be loaded at an address which is a multiple of 4. The address of .text.hot is guaranteed to be a multiple of 4, but not necessarily a multiple of 16. This patch deletes the constraint if (SHeader->sh_offset == PHeader.p_offset) Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D67260 llvm-svn: 371501
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud