Linux command "file" shows "for GNU / Linux 2.6.24"

I always use the command fileto check the file type, mainly after compiling a new project, to make sure everything is in order.

The result looks something like this:

proj_out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=0x23d9f966854e09d721c6110d505247483dae02fe, stripped

My question is that my Linux kernel has been updated to version 3.0+, why does it still show that it compiled for older versions of Linux?

for GNU/Linux 2.6.24

Is this related to the team fileor do I need to do something to compile my project with the new Linux kernel?

thank

+5
source share
2 answers

, , , . C, .

C C ( glibc). , C API (.. C ). , .

, , , .

@REALFREE: . , , :

$ uname -r
3.10-2-amd64
$ gcc -Wall -Werror hello.c -o hello
$ readelf --notes ./hello
Displaying notes found at file offset 0x0000021c with length 0x00000020:
  Owner                 Data size       Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
    OS: Linux, ABI: 2.6.32

ABI NOTE. . ABI C.

$ ldd ./hello
        linux-vdso.so.1 (0x00007fffd31fe000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5f1a465000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5f1a827000)
$ readelf --notes /lib/x86_64-linux-gnu/libc.so.6
Displaying notes found at file offset 0x00000294 with length 0x00000020:
  Propriétaire        Taille des données        Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (étiquette de version ABI)
    OS: Linux, ABI: 2.6.32

C, . C 2.6.32, . , 2.6.32, .

+9

, glibc C , . , , , , .

+2

All Articles