diff options
author | Raghu Gandham <raghu.gandham@imgtec.com> | 2014-12-18 19:12:19 -0800 |
---|---|---|
committer | Raghu Gandham <raghu.gandham@imgtec.com> | 2014-12-19 11:13:11 -0800 |
commit | 688157295f55edbfddb2277e7bdf5635f6be591a (patch) | |
tree | 1b112c37b41793712198b43e4ae492587c6272b0 /linker/linker.cpp | |
parent | 65e6985617d035ef45da86f8c8bcceea7bc47239 (diff) | |
download | android_bionic-688157295f55edbfddb2277e7bdf5635f6be591a.tar.gz android_bionic-688157295f55edbfddb2277e7bdf5635f6be591a.tar.bz2 android_bionic-688157295f55edbfddb2277e7bdf5635f6be591a.zip |
Add support for DT_MIPS_RLD_MAP2 tag.
Position Independent Executables cannot communicate with GDB using DT_MIPS_RLD_TAG.
Hence a new tag DT_MIPS_RLD_MAP2 got introduced to fix the issue.
Change-Id: I77ce3faf1ef2e121003b804ecd291abb25cfbb56
Signed-off-by: Nikola Veljkovic<Nikola.Veljkovic@imgtec.com>
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index 34099316f..babefeb3c 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -2402,6 +2402,13 @@ bool soinfo::prelink_image() { *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: |