forked from OSchip/llvm-project
0712038458
The linker or post-link optimizer can create an ELF image with multiple executable segments each of which will be loaded separately at run time. This breaks the assumption of llvm-profgen that currently only supports one base load address. What it ends up with is that the subsequent mmap events will be treated as an overwrite of the first mmap event which will in turn screw up address mapping. While it is non-trivial to support multiple separate load addresses and given that on x64 those segments will always be loaded at consecutive addresses (though via separate mmap sys calls), I'm adding an error checking logic to bail out if that's violated and keep using a single load address which is the address of the first executable segment. Also changing the disassembly output from printing section offset to printing the virtual address instead, which matches the behavior of objdump. Differential Revision: https://reviews.llvm.org/D103178 |
||
---|---|---|
.. | ||
Inputs | ||
cs-extbinary.test | ||
cs-interrupt.test | ||
cs-preinline.test | ||
disassemble.test | ||
fname-canonicalization.test | ||
inline-cs-noprobe.test | ||
inline-cs-pseudoprobe.test | ||
invalid-perfscript.test | ||
lit.local.cfg | ||
merge-cold-profile.test | ||
mmapEvent.test | ||
multi-load-segs.test | ||
noinline-cs-noprobe.test | ||
noinline-cs-pseudoprobe.test | ||
pseudoprobe-decoding.test | ||
recursion-compression-noprobe.test | ||
recursion-compression-pseudoprobe.test | ||
symbolize.test | ||
truncated-pseudoprobe.test |