I just noticed this, which doesn't actually seem to affect anything but does create a mystery: [frankcox at mutt temp]$ cat test.c #include <stdio.h> int main(void) { printf("Hello world\n"); return 0; } [frankcox at mutt temp]$ gcc -o test test.c [frankcox at mutt temp]$ file test test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped [frankcox at mutt temp]$ uname -a Linux mutt.melvilletheatre.net 2.6.32-220.17.1.el6.x86_64 #1 SMP Wed May 16 00:01:37 BST 2012 x86_64 x86_64 x86_64 GNU/Linux Why does the output from file say "Linux 2.6.18" when the actual kernel in use is 2.6.32? -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com www.creekfm.com - FIFTY THOUSAND WATTS of POW WOW POWER!
On Sat, 26 May 2012 10:25:54 +0200 Reindl Harald wrote:> > Why does the output from file say "Linux 2.6.18" when the actual kernel in > > use is 2.6.32? > > it DOES NOT, learn to read outputs - it speaks about the elfutils > why should their output reflect the current kernel point version > it is not their job because "uname" exists[frankcox at mutt ~]$ rpm -q elfutils elfutils-0.152-1.el6.x86_64 That's not version 2.6.18 either. My question is, where does that 2.6.18 come from? It's not the current kernel version, it's not the gcc version, and it's not the current elfutils version either. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com www.creekfm.com - FIFTY THOUSAND WATTS of POW WOW POWER!
On Sat, 26 May 2012 21:32:52 +0200 Reindl Harald wrote:> from the binary, "file" does only print what a file containsOk, then where does it come from, since it's not the current kernel version and it's not the elfutils version? gcc somehow finds that number and inserts it into the binary. Where did it find it and why is that number not the same as the other stuff, notably the kernel, since it appears to be a kernel version number? Just not the current kernel version number. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com www.creekfm.com - FIFTY THOUSAND WATTS of POW WOW POWER!