[Gllug] ELF, LSB [...] , stripped

Pete Ryland pdr at pdr.cx
Sun Oct 20 02:26:49 UTC 2002


Yes, another one of those saturday nights when i come home and do email.. :)

On Sat, Oct 19, 2002 at 10:09:43PM +0100, Pavel Bradut Boghita wrote:
> I've been playing with some commands on my system and wondered about the
> output to the file command bellow.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> user at machine:/bin$ file /bin/ls
> /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),dynamically 
> linked (uses shared libs), stripped
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> I was wondering if someone could give me a short explanation of what this
> means, just enough to have an idea. I searched google for ELF and LSB but
> I only found stuff which goes on about converting from SVR4 to ELF...
> anyway I understood that ELF is some way to package (compile) binaries...
> !?

ELF stands for Executable and Linking Format.  I'm sure I'll be corrected,
but it was used originally by System five release four ('SysV rel4' or
similar (as opposed to berkeley (BSD) flavour Unix)).  Anyway, Linux didn't
always use this format for executables, and I'm sure a lot of us remember
the transition from 'a.out' binaries to elf binaries, which was a real
bitch.  worse than the libc transition if you ask me.  the so-called 'a.out'
format (of origin unknown to me... minix-based?) is still actually supported
by the kernel in case you have any binary-only stuff still around.

> - LSB I don't know what it means, a type of executable perhaps ?

as said, little-endian.  that is, least-significant bit first.  other
possibility is MSB i.e. big-endian.  for more info about endianness, see
http://www.google.com/search?q=endianness&btnI=yes

> - Intel 80386 - the minimum type of processor which can run it ?

yep, target processor.  fortunately intel's cpus are more or less downward
compatible making your statement true.  actually, looking through the magic
file where 'file (1)' gets its data from, the only intel targets that ELF
supports are '80386', '80486' and 'IA-64'.

> - version 1 (SYSV) - no idea

i guess there's only been one version of the ELF format so far?

> - dynamically linked - there are links somewhere pointing to /bin/ls ?
> - stripped - no idea

what they said.

Pete

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list