Question

I'm having a hard time understanding the output of ldd - Especially the processor identifiers. The string in question is this one:

Shortest.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, from ']', not stripped

I have several questions about it:

  • What does "ELF" mean? I know that's what Linux binaries are called like (Windows Binaries are called PE Binaries, "Portable Executable" Binaries), but isn't ELF an abbreviation for something?
  • What does LSB mean? I can't even guess it...
  • I see the string "Intel" there, now I seriously wonder about the portability of Linux binaries, as ldd seems to expect every binary to be compiled on a intel processor... but what if it wasn't compiled on a Intel processor? Or when I attempt to run the binary on a computer that doesn't run ontop of a Intel processor?
  • Why the ']'? My guess is it should be some sort of Linker identify, but ']' doesn't look much like a Identifier...

Thanks in advance

Was it helpful?

Solution

ELF is executable and Linkable Format - it specifies the format of the library - see Executable and Linkable Format. LSB specifies the endianness of the data. The Intel 386 means it will run on all chips compatible with the 386, which includes Pentiums, and AMD's chips, but not (say) Power PC or IBM/370 architectures.

As for the ']', this library wouldn't have anything to do with the test utility, would it? The one that allows you to say:

if test -x foobar

or

if [ -x foobar ]

in shell scripts.

OTHER TIPS

  • ELF
  • LSB
  • Intel: Linux binaries are not meant to be portable accros CPUs and achitectures. This one is meant to be used on a CUP able to run Intel 80386 birary code.
  • ']': ??
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top