-/* $OpenBSD: exec_elf.c,v 1.170 2022/10/22 15:06:47 deraadt Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.171 2022/10/23 02:53:14 deraadt Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
if ((ph->p_flags & (PF_X | PF_W)) != (PF_X | PF_W) &&
(ph->p_flags & PF_OPENBSD_MUTABLE) == 0)
flags |= VMCMD_IMMUTABLE;
-#if defined (__mips__)
- flags &= ~VMCMD_IMMUTABLE; /* DT_DEBUG is not ready on mips */
-#endif
msize = ph->p_memsz + diff;
offset = ph->p_offset - bdiff;
addr += size;
break;
- case PT_DYNAMIC:
case PT_PHDR:
case PT_NOTE:
break;
ph[i].p_memsz, ph[i].p_vaddr + pos, NULLVP, 0, 0);
break;
+ case PT_DYNAMIC:
+#if defined (__mips__)
+ /* DT_DEBUG is not ready on mips */
+ NEW_VMCMD(&epp->ep_vmcmds, vmcmd_mutable,
+ ph[i].p_memsz, ph[i].p_vaddr + pos, NULLVP, 0, 0);
+#endif
+ break;
case PT_GNU_RELRO:
case PT_OPENBSD_MUTABLE:
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_mutable,
case PT_INTERP:
/* Already did this one */
- case PT_DYNAMIC:
case PT_NOTE:
break;
ph[i].p_memsz, ph[i].p_vaddr + exe_base, NULLVP, 0, 0);
break;
+ case PT_DYNAMIC:
+#if defined (__mips__)
+ /* DT_DEBUG is not ready on mips */
+ NEW_VMCMD(&epp->ep_vmcmds, vmcmd_mutable,
+ ph[i].p_memsz, ph[i].p_vaddr + exe_base, NULLVP, 0, 0);
+#endif
+ break;
case PT_GNU_RELRO:
case PT_OPENBSD_MUTABLE:
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_mutable,