Fix gdb could not get shared library list issue

Get dynamic flags from phdr table's correct entry rather the first
entry, so that the following DT_DEBUG entry can be set.

Also fix the undefined reference to LoadTask::deleter issue under gcc
-O0 option.

Bug: 17524778
Change-Id: I9c679af197b034761fb739d6c980e628ff2ab84c
diff --git a/linker/linker_phdr.h b/linker/linker_phdr.h
index d4c3ce8..593fb5a 100644
--- a/linker/linker_phdr.h
+++ b/linker/linker_phdr.h
@@ -101,6 +101,7 @@
 #endif
 
 void phdr_table_get_dynamic_section(const ElfW(Phdr)* phdr_table, size_t phdr_count,
-                                    ElfW(Addr) load_bias, ElfW(Dyn)** dynamic);
+                                    ElfW(Addr) load_bias, ElfW(Dyn)** dynamic,
+                                    ElfW(Word)* dynamic_flags);
 
 #endif /* LINKER_PHDR_H */