Using the command

file my_executable_binary

I get information like this:

ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.34, dynamically linked (uses shared libs), stripped

but for shared lib:

file my_shared_lib.so 

I only get information

ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped

Is it possible to get the for GNU/Linux 2.6.34 part also when inspecting a shared library?


The line for GNU/<kernel> <kernel-version> in file output is created from a note section of the ELF binary1. If file doesn't output this line, then there isn't an appropriate note in the binary2 and the utility has no way to know to print it.

1 see PT_NOTE and .note in elf(5)

2 because it handles every note

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.