Which version number field is displayed by the linux file command

If I run the following command in my executable file called "version" compiled on Fedora Core 11, I get this output

file version

: ELF 32-bit LSB executable, Intel 80386 version 1 (SYSV), dynamically linked (uses shared libraries), for GNU / Linux 2.6.18 , not stripping

What value of the number 2.6.18 is coming to an end, and is it useful for him to distinguish between clients, which version of any software should they download?

From what I have looked so far, this number is definitely not

  • Kernel version
  • Libc version
  • Everything related to lsb_release

I would like to get a simple identifier to let customers know which binary version they should download, which ideally they should identify by typing a command (for example, uname -a, although this is obviously not the one in this case).

thanks

+6
linux glibc version release
source share
1 answer

This is the kernel version of the machine on which the binary file was compiled. If you are using precompiled binaries from your distribution, this is the kernel version of the distribution provider machine, possibly in its compiled farm.

This is relevant, for example. when considering system calls. Say your binary uses syscall no. X and you use a kernel that does not support X even or worse, assigned syscall no. X for another system call.

The Vanilla Linux Kernel user interface is stable. This means that every script available in Linux A is available in Linux B if A <=B But it may happen that some developer releases his own version of Linux (something like linux-2.6.18-xy ), and he / she implements the new syscall. If s / he is now compiling the binary using this kernel version, the binary will be marked with this version. That way, you can later find out that it may or may not work.

Btw, /usr/include/asm/unistd_32.h contains the system call numbers, excerpt:

 [...] #define __NR_restart_syscall 0 #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 #define __NR_write 4 #define __NR_open 5 [...] 
+7
source share

All Articles