Use trivial types to avoid calls to new for globals

To avoid initialization ordering problem avoid constructing
non-trivial global objects for linker_logger.

This patch also adds explicit check for bloc_size_ on alloc

Change-Id: I2cb3b13a10b7fac1f52a20038af77266d3e1da96
diff --git a/linker/linker_allocator.cpp b/linker/linker_allocator.cpp
index 57811d8..7deddea 100644
--- a/linker/linker_allocator.cpp
+++ b/linker/linker_allocator.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "linker_allocator.h"
+#include "linker_debug.h"
 #include "linker.h"
 
 #include <algorithm>
@@ -73,6 +74,8 @@
     : type_(0), block_size_(0), free_pages_cnt_(0), free_blocks_list_(nullptr) {}
 
 void* LinkerSmallObjectAllocator::alloc() {
+  CHECK(block_size_ != 0);
+
   if (free_blocks_list_ == nullptr) {
     alloc_page();
   }
diff --git a/linker/linker_logger.cpp b/linker/linker_logger.cpp
index 7499a83..78f14d4 100644
--- a/linker/linker_logger.cpp
+++ b/linker/linker_logger.cpp
@@ -41,7 +41,7 @@
 LinkerLogger g_linker_logger;
 
 static const char* kSystemLdDebugProperty = "debug.ld.all";
-static const std::string kLdDebugPropertyPrefix = "debug.ld.app.";
+static const char* kLdDebugPropertyPrefix = "debug.ld.app.";
 
 static const char* kOptionErrors = "dlerror";
 static const char* kOptionDlopen = "dlopen";