All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] alpha: correctly defines TARGET_MAP_xx constants
@ 2008-09-18  8:16 Tristan Gingold
  2008-09-18  9:21 ` Aurelien Jarno
  0 siblings, 1 reply; 3+ messages in thread
From: Tristan Gingold @ 2008-09-18  8:16 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

Hi,

most of the TARGET_MAP_xx macros were wrong for alpha.  This patch  
fixes it.
Using this patch I was able to run an hello-world program (using  
printf) statically
linked with an old glibc.

I agree that the TARGET_MAP_xx definition block starts to be a mess.   
Maybe maintainers
have strong opinions about that.

Tristan.

Signed-off-by: Tristan Gingold <gingold@adacore.com>


[-- Attachment #2: q-alpha11.diff --]
[-- Type: application/octet-stream, Size: 1482 bytes --]

Index: linux-user/syscall_defs.h
===================================================================
--- linux-user/syscall_defs.h	(revision 5247)
+++ linux-user/syscall_defs.h	(working copy)
@@ -860,9 +860,21 @@
 
 #include "termbits.h"
 
+/* Common.  */
 #define TARGET_MAP_SHARED	0x01		/* Share changes */
 #define TARGET_MAP_PRIVATE	0x02		/* Changes are private */
 #define TARGET_MAP_TYPE	0x0f		/* Mask for type of mapping */
+#if defined(TARGET_ALPHA)
+#define TARGET_MAP_FIXED	0x100		/* Interpret addr exactly */
+#define TARGET_MAP_ANONYMOUS	0x10		/* don't use a file */
+#define TARGET_MAP_GROWSDOWN	0x01000		/* stack-like segment */
+#define TARGET_MAP_DENYWRITE	0x02000		/* ETXTBSY */
+#define TARGET_MAP_EXECUTABLE	0x04000		/* mark it as an executable */
+#define TARGET_MAP_LOCKED	0x08000		/* lock the mapping */
+#define TARGET_MAP_NORESERVE	0x10000		/* no check for reservations */
+#define TARGET_MAP_POPULATE	0x20000		/* pop (prefault) pagetables */
+#define TARGET_MAP_NONBLOCK	0x40000		/* do not block on IO */
+#else
 #define TARGET_MAP_FIXED	0x10		/* Interpret addr exactly */
 #if defined(TARGET_MIPS)
 #define TARGET_MAP_ANONYMOUS	0x0800		/* don't use a file */
@@ -888,6 +900,7 @@
 #define TARGET_MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
 #define TARGET_MAP_NONBLOCK	0x10000		/* do not block on IO */
 #endif
+#endif
 
 #if (defined(TARGET_I386) && defined(TARGET_ABI32)) || defined(TARGET_ARM) || defined(TARGET_CRIS)
 struct target_stat {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-29 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-18  8:16 [Qemu-devel] [PATCH] alpha: correctly defines TARGET_MAP_xx constants Tristan Gingold
2008-09-18  9:21 ` Aurelien Jarno
2008-09-29 17:24   ` Aurelien Jarno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.