llvm-capstone/bolt/unittests/Core
JohnLee1243 ae51ec84bb
[Bolt] Solving pie support issue (#65494)
Now PIE is default supported after clang 14. It cause parsing error when
using perf2bolt. The reason is the base address can not get correctly.
Fix the method of geting base address. If SegInfo.Alignment is not equal
to pagesize, alignDown(SegInfo.FileOffset, SegInfo.Alignment) can not
equal to FileOffset. So the SegInfo.FileOffset and FileOffset should be
aligned by SegInfo.Alignment first and then judge whether they are
equal.
The .text segment's offset from base address in VAS is aligned by
pagesize. So MMapAddress's offset from base address is
alignDown(SegInfo.Address, pagesize) instead of
alignDown(SegInfo.Address, SegInfo.Alignment). So the base address
calculate way should be changed.

Co-authored-by: Li Zhuohang <lizhuohang3@huawei.com>
2023-11-16 15:05:06 +08:00
..
BinaryContext.cpp [Bolt] Solving pie support issue (#65494) 2023-11-16 15:05:06 +08:00
CMakeLists.txt
DynoStats.cpp
MCPlusBuilder.cpp [BOLT][NFC] Add MCSubtargetInfo to MCPlusBuilder (#68223) 2023-10-06 06:39:58 +00:00