1

I have attempted to run readelf with the option of -h and it displays two fields called Version both having the number 1 in them.

It says Version 1(current) in one of the fields and Version 0x1 in the other.

What is the significance of these two fields?

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           <unknown>: 0xFFFF
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          2384 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         5
  Size of section headers:           40 (bytes)
  Number of section headers:         11
  Section header string table index: 10
Har
  • 3,727
  • 10
  • 41
  • 75

1 Answers1

1

it displays two fields called Version

There are two versions: one is part of the e_ident and identifies the ELF format itself. The other is e_version and identifies the "object file version".

I am not aware of any changes to either of these fields, so in practice both of them are always 1.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362