[PATCH] D51454: [LLD] [COFF] Make sections with runtime pseudo relocations writable

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 14:10:25 PDT 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D51454#1218266, @rnk wrote:

> Won't this effectively move Itanium vtables into .data? That seems... dangerous.


I'm not fluent enough in the itanium ABI to off-hand say what pointers there actually are there. For RTTI data, with the libc++ in a separate DLL, it'll at least need to make them writable for the type info vtable pointer (see https://reviews.llvm.org/D43184 for old discussion on that). And probably also for other cases if things are autoimported.

As long as nothing is autoimported and needs pseudo relocs, nothing is made writable.

If you feel this is generally something that one generally would want to avoid, we perhaps should make it an option instead. Then someone linking things for Windows Store/UWP configurations (where VirtualProtect is unusable) can enable it. For other cases, making things writable only for a short time on load while fixing relocations probably is better.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D51454





More information about the llvm-commits mailing list