* Fix one more bug in PIC codegen: extra load is needed for *all*
non-statics.
* Introduce new option to output zero-initialized data to .bss section.
This can reduce size of binaries. Enable it by default for ELF &
Cygwin/Mingw targets. Probably, Darwin should be also added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33299 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index 7547614..f6b3fd0 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -28,6 +28,7 @@
   bool UnsafeFPMath;
   bool FiniteOnlyFPMathOption;
   bool UseSoftFloat;
+  bool NoZerosInBSS;
   Reloc::Model RelocationModel;
   CodeModel::Model CMModel;
 }
@@ -61,6 +62,11 @@
                cl::desc("Generate software floating point library calls"),
                cl::location(UseSoftFloat),
                cl::init(false));
+  cl::opt<bool, true>
+  DontPlaceZerosInBSS("nozero-initialized-in-bss",
+               cl::desc("Don't place zero-initialized symbols into bss section"),
+               cl::location(NoZerosInBSS),
+               cl::init(false));
 
   cl::opt<llvm::Reloc::Model, true>
   DefRelocationModel(