[PATCH] D28984: [LLD] Do not allocate space for common symbols with -r

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 15:58:44 PST 2017


ruiu requested changes to this revision.
ruiu added a comment.
This revision now requires changes to proceed.

Can you add a test? Otherwise this looks good.



================
Comment at: lld/ELF/Driver.cpp:501-502
   Config->Relocatable = Args.hasArg(OPT_relocatable);
+  Config->DefineCommon = getArg(Args, OPT_define_common, OPT_no_define_common,
+      !Config->Relocatable);
   Config->Discard = getDiscardOption(Args);
----------------
Nice use of getArg's default value!


https://reviews.llvm.org/D28984





More information about the llvm-commits mailing list