shenhan added a comment.

In D85408#2253055 <https://reviews.llvm.org/D85408#2253055>, @MaskRay wrote:

> I am still reading the patch, but I have noticed one thing worth discussing. 
> `.bb_addr_map` is a non-SHF_ALLOC section (meaning that it is not part of the 
> memory image). An absolute relocation type (`.quad .Lfunc_begin0`) works but 
> the value is a link-time address, not taking account of the load base 
> (PIE/shared object)). (If .bb_addr_map has the SHF_ALLOC flag, linkers will 
> report a text relocation) How do you intend to use `.bb_addr_map` at runtime?

Regarding "not taking account of the load base (PIE/shared object)" - the 
profile conversion tool uses addresses in .bb_addr_map section and MMAP entries 
in perf.data file to construct runtime addresses, so these runtime addresses 
can be matched with the profile addresses recorded in perf.data file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85408/new/

https://reviews.llvm.org/D85408

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to