You are not logged in.

#1 2007-08-20 11:38:14

belhifet
Member
Registered: 2007-04-17
Posts: 39

file(1) reports weird Linux version

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  ................

So why is it 2.6.6?

Offline

Board footer

Powered by FluxBB