Don't create anonymous namespace

Anonymous namespace is not created separately. When a regular namespace
is created with ANDROID_NAMESPACE_TYPE_ALSO_USED_AS_ANONYMOUS, that
namespace is used as the anonymous namespace.

Bug: 130388701
Test: CtsBionicTestCases
Change-Id: Ie449a59f303487a7a9ff6fff98e6148e9f968fd2
diff --git a/linker/linker_namespaces.h b/linker/linker_namespaces.h
index 215ad05..9561bb4 100644
--- a/linker/linker_namespaces.h
+++ b/linker/linker_namespaces.h
@@ -72,7 +72,10 @@
 
 struct android_namespace_t {
  public:
-  android_namespace_t() : is_isolated_(false), is_greylist_enabled_(false) {}
+  android_namespace_t() :
+    is_isolated_(false),
+    is_greylist_enabled_(false),
+    is_also_used_as_anonymous_(false) {}
 
   const char* get_name() const { return name_.c_str(); }
   void set_name(const char* name) { name_ = name; }
@@ -83,6 +86,9 @@
   bool is_greylist_enabled() const { return is_greylist_enabled_; }
   void set_greylist_enabled(bool enabled) { is_greylist_enabled_ = enabled; }
 
+  bool is_also_used_as_anonymous() const { return is_also_used_as_anonymous_; }
+  void set_also_used_as_anonymous(bool yes) { is_also_used_as_anonymous_ = yes; }
+
   const std::vector<std::string>& get_ld_library_paths() const {
     return ld_library_paths_;
   }
@@ -164,6 +170,7 @@
   std::string name_;
   bool is_isolated_;
   bool is_greylist_enabled_;
+  bool is_also_used_as_anonymous_;
   std::vector<std::string> ld_library_paths_;
   std::vector<std::string> default_library_paths_;
   std::vector<std::string> permitted_paths_;