Page MenuHomeFreeBSD

D4791.diff
No OneTemporary

D4791.diff

Index: head/libexec/rtld-elf/rtld.c
===================================================================
--- head/libexec/rtld-elf/rtld.c
+++ head/libexec/rtld-elf/rtld.c
@@ -1144,13 +1144,13 @@
* is mapped read-only. DT_MIPS_RLD_MAP is used instead.
*/
-#ifndef __mips__
case DT_DEBUG:
+ if (!obj->writable_dynamic)
+ break;
if (!early)
dbg("Filling in DT_DEBUG entry");
((Elf_Dyn*)dynp)->d_un.d_ptr = (Elf_Addr) &r_debug;
break;
-#endif
case DT_FLAGS:
if (dynp->d_un.d_val & DF_ORIGIN)
@@ -1331,6 +1331,8 @@
break;
case PT_DYNAMIC:
+ if (ph->p_flags & PROT_WRITE)
+ obj->writable_dynamic = true;
obj->dynamic = (const Elf_Dyn *)(ph->p_vaddr + obj->relocbase);
break;

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 8, 3:03 AM (20 m, 59 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34826979
Default Alt Text
D4791.diff (740 B)

Event Timeline