Revert "Revert "Fix dlsym() to take into account RTLD_GLOBAL/LOCAL""

This reverts commit 9d3382d97a2cdc8c8f78c7825ece16f09292fc36.
diff --git a/linker/linker.h b/linker/linker.h
index fa38c7f..6329efd 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -201,7 +201,7 @@
 #endif
   bool has_DT_SYMBOLIC;
 
-  soinfo(const char* name, const struct stat* file_stat, off64_t file_offset);
+  soinfo(const char* name, const struct stat* file_stat, off64_t file_offset, int rtld_flags);
 
   void CallConstructors();
   void CallDestructors();
@@ -216,6 +216,8 @@
   dev_t get_st_dev();
   off64_t get_file_offset();
 
+  int get_rtld_flags();
+
   soinfo_list_t& get_children();
   soinfo_list_t& get_parents();