Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jun 2002 00:32:05 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 13147 for review
Message-ID:  <200206190732.g5J7W5m23890@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=13147

Change 13147 by peter@peter_ia64 on 2002/06/19 00:31:39

	Sigh, the x86 cvsup binary immediately tries to execute its data
	segment.  This hack doesn't deserve to see the light of day, and
	doesn't solve all the M3 runtime problems.  But it might come in
	handy some day.

Affected files ...

... //depot/projects/ia64/sys/kern/imgact_elf.c#10 edit

Differences ...

==== //depot/projects/ia64/sys/kern/imgact_elf.c#10 (text+ko) ====

@@ -676,6 +676,15 @@
 			if (phdr[i].p_flags & PF_R)
   				prot |= VM_PROT_READ;
 
+#if defined(__ia64__) && __ELF_WORD_SIZE == 32 && defined(IA32_ME_HARDER)
+			/*
+			 * Some x86 binaries assume read == executable,
+			 * notably the M3 runtime and therefore cvsup
+			 */
+			if (prot & VM_PROT_READ)
+				prot |= VM_PROT_EXECUTE;
+#endif
+
 			if ((error = __elfN(load_section)
 			     (imgp->proc,
 			      vmspace, imgp->vp,

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206190732.g5J7W5m23890>