[csw-maintainers] Determining the architecture of a binary

James Lee james at opencsw.org
Wed Jan 13 13:49:31 CET 2010


On 13/01/10, 10:37:53, Maciej "(Matchek)" Blizinski <maciej at opencsw.org>
wrote regarding [csw-maintainers] Determining the architecture of a 
binary:

> I'd like to write a new check, to make sure that the actual binaries
> inside a package match the architecture declared in the pkginfo file.
> Unfortunately, the file command's output is not as reliable as I'd
> like it to.  For instance, on build8s, it can tell when a binary is
> i386, but it doesn't say the same about an amd64 binary.

> maciej at build8s [build8s]:~ > file
>
~maciej/src/opencsw/pkg/mysql5/branches/mysql-5.0.x/work/solaris8-i386/i
ns
tall-isa-i386/opt/csw/mysql5/bin/mysql
> | cut -d: -f2
>         ELF 32-bit LSB executable 80386 Version 1, dynamically linked,
stripped
> maciej at build8s [build8s]:~ > file
>
~maciej/src/opencsw/pkg/mysql5/branches/mysql-5.0.x/work/solaris8-i386/i
ns
tall-isa-amd64/opt/csw/mysql5/bin/amd64/mysql
> | cut -d: -f2
>         ELF 64-bit LSB executable Version 1, dynamically linked, stripped



"LSB" goes with i386 and "MSB" goes with sparc.  I guess it stands for
least and most significant bit for the endian.

If it's 64 bit and not sparc then what else is it?



James.



More information about the maintainers mailing list