Open Quuxplusone opened 6 years ago
Bugzilla Link | PR35701 |
Status | NEW |
Importance | P enhancement |
Reported by | Max Moroz (mmoroz@chromium.org) |
Reported on | 2017-12-19 14:12:04 -0800 |
Last modified on | 2018-01-20 10:28:26 -0800 |
Version | unspecified |
Hardware | PC Linux |
CC | efriedma@quicinc.com, kcc@google.com, llvm-bugs@lists.llvm.org, vsk@apple.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Vedant, I wonder if you ever run into a similar issue?
Darwin doesn't support the large code model and the coverage mapping data is too big.
Nothing should be accessing llvm_covmap (it's read-only). The problem is that the covmap section is sandwiched between sections A and B, and A has a RIP-relative reference to a symbol in B. I.e, you should be able to hack past this problem by using linker magic to move the PROTECTED_MEMORY segment before LLVM_COV.
A better solution might be to make the covmap data smaller :). I tried doing this by teaching llvm to GC bits of profile metadata and by moving __LLVM_COV after all the other sections. That was enough to unblock our adopters but it's clearly not enough for Chromium. I've outlined what I think is a workable plan here but won't have time to get to it until late January (probably): https://bugs.llvm.org/show_bug.cgi?id=34533
I think this issue doesn't show up on Linux because the __llvm_covmap section isn't allocatable; see https://reviews.llvm.org/rL257781.
Of course, the very large covmap section leads to other problems.
Right, IIRC MachO doesn't have a similar flag which can mark sections non-allocable.
Thank you for the answers! That makes sense, we'll try to move PROTECTED_MEMORY segment before __LLVM_COV.