[PATCH] D13468: [ELF2] -z now option implemented

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 10:20:01 PDT 2015


grimar added inline comments.

================
Comment at: ELF/Driver.cpp:143
@@ +142,3 @@
+    else {
+      warning(Twine("ignoring unknown argument for -z: ") + Opt);
+    }
----------------
ruiu wrote:
> Let's not warn on unknown options for now. They were silently ignored before this patch.
Yes, I know they were. But this is equals to ld behavior now. It shows warnings on unknown -z options. But if you wish I will remove.

================
Comment at: ELF/OutputSections.cpp:319-324
@@ -316,2 +318,8 @@
 
+  uint32_t Flags = 0;
+  if (Config->Now)
+    Flags |= DF_1_NOW;
+  if (Flags)
+    WriteVal(DT_FLAGS_1, Flags);
+
   WriteVal(DT_NULL, 0);
----------------
ruiu wrote:
>   if (Config->Now)
>     WriteVal(DT_FLAGS_1, DF_1_NOW);
> 
There are many possible -z options. And Flag is requred to combine them when at least one more will be added.


http://reviews.llvm.org/D13468





More information about the llvm-commits mailing list