On 02/13/2017 08:47 AM, James Cowgill wrote:
>> Is there any simple way for MIPS o32 userspace to find out whether
>> the kernel is not a native MIPS o32?  Something less hackish
>> than manually invoking a MIPS n64 syscall?
> 
> uname -m is a bit less hackish:
> 
> 32-bit kernel: $(uname -m) = mips
> 64-bit kernel: $(uname -m) = mips64
> 
> Note there is no difference between big and little endian here.

This can still lie, e.g. under setarch.

$ setarch i386 uname -rm
4.9.6-200.fc25.x86_64 i686

It doesn't even matter that my /usr/bin/uname is a 64-bit binary.  And
while Fedora puts the arch in the release string, you can't rely on that
everywhere.

But I don't know any truly foolproof way.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to