[PATCH] D33251: [lld][ELF]Add option to make .dynamic read only

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 16:35:41 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Config.h:147
   bool ZOrigin;
+  bool ZReadOnlyDynamic;
   bool ZRelro;
----------------
These variables are named after their corresponding command line options, so ZRodynamic.


================
Comment at: ELF/SyntheticSections.cpp:1060
+  // The loader writes the pointer into this entry.
+  // DT_DEBUG is the only .dynamic entry that needs to be written to.
+  // Some systems (like Fuchsia OS) provide other means to give the debugger
----------------
You want to break the paragraph by adding a blank `//` line.


================
Comment at: ELF/SyntheticSections.cpp:1061-1062
+  // DT_DEBUG is the only .dynamic entry that needs to be written to.
+  // Some systems (like Fuchsia OS) provide other means to give the debugger
+  // this information. Such systems may choose make .dynamic read-only.
+  // If the target is such a system (used -z rodynamic) don't write DT_DEBUG.
----------------
Let's avoid writing comments too abstractly. "Some systems (currently only Fuchsia)"  and instead of "Such systemS", "Fuchsia".


Repository:
  rL LLVM

https://reviews.llvm.org/D33251





More information about the llvm-commits mailing list