bionic/linker
Benjamin Adolphi 006f9ad891 Linker writes to wrong memory location when processing DT_MIPS_RLD_MAP
When bionic's dynamic linker processes the .dynamic section of a MIPS ELF binary and encounters the DT_MIPS_RLD_MAP dynamic array tag, it calculates the address of where to write a pointer to the _r_debug structure. The current implementation simply reads the value given in the d_ptr field and writes the pointer address to that location. However, this value has to be adjusted to reflect the real load address of the binary. Otherwise the linker will write to a faulty location possibly resulting in a crash when linking a MIPS binary that includes DT_MIPS_RLD_MAP. This change corrects that problem.

Change-Id: I1a91874f7ab47289001fe72d9016660c14c70362
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
2014-02-19 00:50:32 +01:00
..
arch [MIPS64] Dynamic linker 2014-02-11 15:33:14 -08:00
Android.mk build linker and linker64 on 64-bit architectures 2014-02-13 11:18:47 -08:00
debugger.cpp Clean up debugger.cpp slightly. 2014-01-31 17:27:00 -08:00
dlfcn.cpp Clean up all the lint cpplint can find in the dynamic linker. 2014-02-11 17:33:49 -08:00
linker_debug.h Clean up all the lint cpplint can find in the dynamic linker. 2014-02-11 17:33:49 -08:00
linker_environ.cpp Fix x86_64 build, clean up intermediate libraries. 2013-10-09 16:00:17 -07:00
linker_environ.h Fix Clang warning since KernelArgumentBlock is actually a class. 2013-10-08 00:08:13 -07:00
linker_executable.mk build linker and linker64 on 64-bit architectures 2014-02-13 11:18:47 -08:00
linker_phdr.cpp Clean up all the lint cpplint can find in the dynamic linker. 2014-02-11 17:33:49 -08:00
linker_phdr.h Switch <elf.h> over to linux uapi under the covers. 2014-02-10 18:22:24 -08:00
linker.cpp Linker writes to wrong memory location when processing DT_MIPS_RLD_MAP 2014-02-19 00:50:32 +01:00
linker.h [MIPS64] Dynamic linker 2014-02-11 15:33:14 -08:00
linker.mk build linker and linker64 on 64-bit architectures 2014-02-13 11:18:47 -08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
NOTICE Regenerate the NOTICE files. 2014-01-07 13:46:11 -08:00
rt.cpp More dynamic linker cleanup. 2012-10-30 16:35:38 -07:00