ls returns large file sizes

Rob Landley rob at
Thu Dec 22 05:50:10 UTC 2005

On Wednesday 21 December 2005 23:02, Mike Frysinger wrote:
> > [arm-readelf also says all the data sections are little endian]
> > Is there any good way to test how the kernel and the library return the
> > 'stat' structure to see if someone thinks they're supposed to use big
> > endian?
> i asked about big endian because there was a bug (maybe still is,
> havent check glibc) in the stat struct for big endian targets
> you could should compile a small .c file which calls the kernel
> stat functions itself rather than using the libc stat functions
> that'd tell you if the kernel was sane or not
> -mike

It's either an endianness issue or a 32/64 bit confusion issue (compiling for 
large file support and your kernel having no idea what that is, perhaps)?  I 
don't know specifically about arm but a 2^44 value for a file size sounds to 
me like "grabbing 64 bits of data from a 32 bit field".  Wild guess.  Of 
course if there's a known endianness issue on arm, that would be the first 
thing to check.  (Do the headers you compiled against bear any relation to 
the kernel you're actually running this stuff on?)

Obviously, this is an area that worked for us when we tried it, which means 
something in your build or runtime environment differs from what we have...

Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.

More information about the busybox mailing list