labath added a comment. In https://reviews.llvm.org/D40079#926328, @clayborg wrote:
> I had suggested in https://reviews.llvm.org/D38142 that we have ObjectFileELF > check the file type of the file and only map with write abilities if the ELF > file is an object file since that is the only time we need relocations. If we > can pass a flag through to indicate how to map, would that provide any > additional performance improvements? Sorry, I hadn't seen that comment. But to answer to question, it would not provide *additional* performance improvements -- the memory will still be shared until you actually try to write to it (with the read-only shared mapping you'll get a SEGV, with a private read-write mapping, the page will be COWed). However, I suppose something like that could be done *instead* of this patch. That way we would be using mmap for most object files, and only resorting to malloc+read for those that need relocating. It's not an ideal solution, but then again, neither is this. https://reviews.llvm.org/D40079 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits