2
votes

The Linux file command provides info about an executable, for example:
"/home/foo: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped"

I am specifically interested in the "for GNU/Linux 2.6.9" portion of that output. What determines that?

Given that I have two machines, both with gcc 4.6 installed, but one has a 2.6.9 Linux kernel and the other has a 3.2.0 Linux Kernel.
If I compile a .o or a .a file on the 2.6.9 machine, and then I take that over to the 3.2.0 machine, could I even link it into an executable built there? If I linked it in, would the kernel version of my executable still be 3.2.0?

1

1 Answers

1
votes

This is the kernel version which is got from the machine, the binary was compiled and packaged during the build process. This is a possible duplicate of the link