llvm-capstone/bolt/unittests
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
..
Core [Bolt] Solving pie support issue (#65494) 2023-11-16 15:05:06 +08:00
Profile [BOLT] Fix broken unittests 2022-12-11 22:34:40 -08:00
CMakeLists.txt [BOLT] Add support for the latest perf tool 2022-07-22 07:56:15 -07:00