[ELF] - Implemented --print-gc-sections command line argument.

List all sections removed by garbage collection. This option is only effective if garbage collection has been enabled via the `--gc-sections' option.

Differential revision: http://reviews.llvm.org/D15327

llvm-svn: 255235
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index b515ddc..2f1cf9b 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -163,6 +163,7 @@
   Config->GcSections = Args.hasArg(OPT_gc_sections);
   Config->NoInhibitExec = Args.hasArg(OPT_noinhibit_exec);
   Config->NoUndefined = Args.hasArg(OPT_no_undefined);
+  Config->PrintGcSections = Args.hasArg(OPT_print_gc_sections);
   Config->Shared = Args.hasArg(OPT_shared);
   Config->StripAll = Args.hasArg(OPT_strip_all);
   Config->Verbose = Args.hasArg(OPT_verbose);