diff --git a/linker/linker.cpp b/linker/linker.cpp
index 34099316fe163eda504e9cd52cb7581012bcdb6c..babefeb3c1fb259fd27da4abec33f913e96b29ea 100644 (file)
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
*dp = &_r_debug;
}
break;
+ case DT_MIPS_RLD_MAP2:
+ // Set the DT_MIPS_RLD_MAP2 entry to the address of _r_debug for GDB.
+ {
+ r_debug** dp = reinterpret_cast<r_debug**>(reinterpret_cast<ElfW(Addr)>(d) + d->d_un.d_val);
+ *dp = &_r_debug;
+ }
+ break;
case DT_MIPS_RLD_VERSION:
case DT_MIPS_FLAGS: