[PATCH] D13468: [ELF2] -z now option implemented
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 09:12:32 PDT 2015
ruiu added inline comments.
================
Comment at: ELF/Config.h:37
@@ -36,2 +36,3 @@
bool NoUndefined;
+ bool Now = false;
bool Shared;
----------------
Name this ZNow so that -z foo would get different name than -foo.
================
Comment at: ELF/Driver.cpp:142-144
@@ +141,5 @@
+ Config->Now = true;
+ else {
+ warning(Twine("ignoring unknown argument for -z: ") + Opt);
+ }
+ }
----------------
If doesn't have {} and else has? Please make this consistent.
================
Comment at: ELF/Driver.cpp:143
@@ +142,3 @@
+ else {
+ warning(Twine("ignoring unknown argument for -z: ") + Opt);
+ }
----------------
Let's not warn on unknown options for now. They were silently ignored before this patch.
================
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);
----------------
if (Config->Now)
WriteVal(DT_FLAGS_1, DF_1_NOW);
http://reviews.llvm.org/D13468
More information about the llvm-commits
mailing list