Support mips shared object debug info
MIPS's .dyanamic section is read-only. Instead of using DT_DEBUG for
the pointer to dyld information it uses a separate tag DT_MIPS_RLD_MAP
which points to storage in the read-write .rld_map section, which in
turn points to the dyld information.
Review: http://llvm-reviews.chandlerc.com/D1890
llvm-svn: 192408
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 0e31cbb4..00204e1 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -515,7 +515,7 @@
}
Address
-ObjectFileELF::GetImageInfoAddress()
+ObjectFileELF::GetImageInfoAddress(bool &indirect)
{
if (!ParseDynamicSymbols())
return Address();
@@ -539,8 +539,9 @@
{
ELFDynamic &symbol = m_dynamic_symbols[i];
- if (symbol.d_tag == DT_DEBUG)
+ if (symbol.d_tag == DT_DEBUG || symbol.d_tag == DT_MIPS_RLD_MAP)
{
+ indirect = (symbol.d_tag == DT_MIPS_RLD_MAP);
// Compute the offset as the number of previous entries plus the
// size of d_tag.
addr_t offset = i * dynsym_hdr->sh_entsize + GetAddressByteSize();
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
index d66b6a1..1ee7979 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -127,7 +127,7 @@
GetDependentModules(lldb_private::FileSpecList& files);
virtual lldb_private::Address
- GetImageInfoAddress();
+ GetImageInfoAddress(bool &indirect);
virtual lldb_private::Address
GetEntryPointAddress ();