[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 17:45:30 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Config.h:147-148
   bool ZOrigin;
+  bool ZRodynamic;
   bool ZRelro;
   bool ZText;
----------------
Sort.


================
Comment at: ELF/Driver.cpp:690-691
   Config->ZOrigin = hasZOption(Args, "origin");
+  Config->ZRodynamic = hasZOption(Args, "rodynamic");
   Config->ZRelro = !hasZOption(Args, "norelro");
   Config->ZStackSize = getZOptionValue(Args, "stack-size", 0);
----------------
Sort


================
Comment at: ELF/SyntheticSections.cpp:1064
+  // If the target is such a system (used -z rodynamic) don't write DT_DEBUG.
+  //
+  if (!Config->Shared && !Config->Relocatable && !Config->ZRodynamic)
----------------
What I wanted is this

  // blah blah blah ...
  // blah blah blah ...
  // 
  // blah blah blah ...
  // blah blah blah ...

and not

  // blah blah blah ...
  // blah blah blah ...
  // blah blah blah ...
  // blah blah blah ...
  // 

(Please look around to find a local convention and follow it.)


Repository:
  rL LLVM

https://reviews.llvm.org/D33251





More information about the llvm-commits mailing list