c - Interpreting ELF symbol table -


i wrote simple program called a.c understand symbol table on x86 machine:

extern int foo;  int function(void){   return foo; } 

i compile , readelf

$gcc -c -m32 a.c

$readelf -a a.o > a.log

the symbol table in a.log shown below:

symbol table '.symtab' contains 10 entries:    num:    value  size type    bind   vis      ndx name      0: 00000000     0 notype  local  default  und      1: 00000000     0 file    local  default  abs a.c      2: 00000000     0 section local  default    1      3: 00000000     0 section local  default    3      4: 00000000     0 section local  default    4      5: 00000000     0 section local  default    6      6: 00000000     0 section local  default    7      7: 00000000     0 section local  default    5      8: 00000000    10 func    global default    1 function      9: 00000000     0 notype  global default  und foo 

what purpose of symbol table entry 0 , entries 2 7?


Popular posts from this blog