OSDN Git Service

Fixes to linker code after the conflict resolution
authorDmitriy Ivanov <dimitry@google.com>
Thu, 2 Oct 2014 20:44:20 +0000 (13:44 -0700)
committerDmitriy Ivanov <dimitry@google.com>
Thu, 2 Oct 2014 20:44:20 +0000 (13:44 -0700)
Change-Id: Icd0728604a865b73e7af0e0aee38971a612935f2

linker/linker.cpp
linker/linker.h
linker/linker_phdr.cpp

index fda168c..6c30e1c 100644 (file)
@@ -792,22 +792,6 @@ static soinfo* load_library(LoadTaskList& load_tasks, const char* name, int rtld
       DL_ERR("library \"%s\" not found", name);
       return nullptr;
     }
-  }
-}
-
-static soinfo* load_library(LoadTaskList& load_tasks, const char* name, int rtld_flags, const android_dlextinfo* extinfo) {
-  int fd = -1;
-  ScopedFd file_guard(-1);
-
-  if (extinfo != nullptr && (extinfo->flags & ANDROID_DLEXT_USE_LIBRARY_FD) != 0) {
-    fd = extinfo->library_fd;
-  } else {
-    // Open the file.
-    fd = open_library(name);
-    if (fd == -1) {
-      DL_ERR("library \"%s\" not found", name);
-      return nullptr;
-    }
 
     file_guard.reset(fd);
   }
index 8afeb14..f6e3a48 100644 (file)
@@ -217,8 +217,6 @@ struct soinfo {
   ino_t get_st_ino();
   dev_t get_st_dev();
 
-
-
   int get_rtld_flags();
 
   soinfo_list_t& get_children();
index 2d03ac3..44c8e9e 100644 (file)
@@ -718,22 +718,6 @@ void phdr_table_get_dynamic_section(const ElfW(Phdr)* phdr_table, size_t phdr_co
       }
       return;
     }
-
-    *dynamic = reinterpret_cast<ElfW(Dyn)*>(load_bias + phdr->p_vaddr);
-    if (dynamic_count) {
-      *dynamic_count = (unsigned)(phdr->p_memsz / 8);
-    }
-    if (dynamic_flags) {
-      *dynamic_flags = phdr->p_flags;
-    }
-    return;
-  }
-  *dynamic = nullptr;
-  for (const ElfW(Phdr)* phdr = phdr_table, *phdr_limit = phdr + phdr_count; phdr < phdr_limit; phdr++) {
-    if (phdr->p_type == PT_DYNAMIC) {
-      *dynamic = reinterpret_cast<ElfW(Dyn)*>(load_bias + phdr->p_vaddr);
-      return;
-    }
   }
 }