From 207f0bc65b61314e16bda2204698184acf1c205b Mon Sep 17 00:00:00 2001 From: emaste Date: Wed, 2 Oct 2013 02:32:58 +0000 Subject: Populate .rld_map on MIPS for debuggers On MIPS the .dynamic section is read-only, so the pointer to rtld information for debuggers cannot be stored there (in DT_DEBUG). Instead, a special section .rld_map is used. Sponsored by: DARPA, AFRL Approved by: re (delphij) --- libexec/rtld-elf/rtld.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libexec') diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index cd18bad..f690d75 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1111,11 +1111,7 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath, break; case DT_MIPS_RLD_MAP: -#ifdef notyet - if (!early) - dbg("Filling in DT_DEBUG entry"); - ((Elf_Dyn*)dynp)->d_un.d_ptr = (Elf_Addr) &r_debug; -#endif + *((Elf_Addr *)(dynp->d_un.d_ptr)) = (Elf_Addr) &r_debug; break; #endif -- cgit v1.1