Hi,

> #define __DEV_T_TYPE        __UQUAD_TYPE
> that is a 64bits.... I don't know if this is ok for sparc 9 or not.
Now it all makes sense, the bus error happens because the userland is
32-bit and it can't handle 64-bit types.

> Hi,
> I'm not sparc expert, but I think that this change is fine, according to 
> what you have explained
> So I've just applied it.
> Thanks
I thought about it again. If you have a v9 or v8 you can also run v7
binaries. Though it wouldn't make sense to compile the apps with
-mcpu=v7 if you configured uClibc for v9 but it works and therefore
uClibc should accept it. I'm woundering why I didn't think about this in
the first place, since the ldso code is already capable of accepting two
different magics.

I've tested these changes with helloworld apps, and also with
busybox(svn 22095) and it works just fine. I even added a proper
singed-off-by line :D

Regards,
Friedrich
[SPARC] Allow v8 and v9 sparcs to execute v7 binaries
		Use 32-bit uint instead of 64-bit for device ids

Signed-off-by: Friedrich Oslage <[EMAIL PROTECTED]>

Index: ldso/ldso/sparc/dl-sysdep.h
===================================================================
--- ldso/ldso/sparc/dl-sysdep.h	(Revision 22110)
+++ ldso/ldso/sparc/dl-sysdep.h	(Arbeitskopie)
@@ -29,14 +29,14 @@
 /* Here we define the magic numbers that this dynamic loader should accept
  * Note that SPARCV9 doesn't use EM_SPARCV9 since the userland is still 32-bit.
  */
+#define MAGIC1 EM_SPARC
+
 #if defined(__sparc_v9__) || defined(__sparc_v8__)
-#define MAGIC1 EM_SPARC32PLUS
+#define MAGIC2 EM_SPARC32PLUS
 #else
-#define MAGIC1 EM_SPARC
+#undef  MAGIC2
 #endif
 
-#undef  MAGIC2
-
 /* Used for error messages */
 #define ELF_TARGET "sparc"
 
Index: libc/sysdeps/linux/sparc/bits/typesizes.h
===================================================================
--- libc/sysdeps/linux/sparc/bits/typesizes.h	(Revision 22110)
+++ libc/sysdeps/linux/sparc/bits/typesizes.h	(Arbeitskopie)
@@ -27,7 +27,7 @@
 /* See <bits/types.h> for the meaning of these macros.  This file exists so
    that <bits/types.h> need not vary across different GNU platforms.  */
 
-#define __DEV_T_TYPE		__UQUAD_TYPE
+#define __DEV_T_TYPE		__U32_TYPE
 #define __UID_T_TYPE		__U32_TYPE
 #define __GID_T_TYPE		__U32_TYPE
 #define __INO_T_TYPE		__ULONGWORD_TYPE

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to