I just compiled a hello world C program with gcc and ran file on it.

I got the following output:
$ file test.out
test.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.6, dynamically linked (uses shared libs), not stripped

I expected it to say "GNU/Linux 2.6.20" and not "GNU/Linux 2.6.6", since I'm using 2.6.20.

$ uname -r
2.6.20-ARCH

I'm using glibc 2.5-6, binutils 2.17-2 and gcc 4.1.2 .

I'm guessing that the "2.6.6" is the minumum kernel version that will be able to run that ELF executable, but I'm not sure and I couldn't find anything in the documentation.

I did an objdump on that binary and:

Contents of section .note.ABI-tag:
8048128 04000000 10000000 01000000 474e5500 ............GNU.
8048138 00000000 02000000 06000000 06000000 ................

It's not file(1)'s fault.

So why is it 2.6.6?

2.6.6 should be the version of the Linux header installed in /usr/include/linux which may differ from the version of the linux that you boot into.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.