title: What exactly is the size of an ELF symbol (both for 64 & 32 bit) & how do you parse it
body: <p>According to <a href="https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-79797.html" rel="nofollow noreferrer">oracles documentation on the ELF file format</a> a 64 bit elf symbol is 30 bytes in size (8 + 1 + 1 + 4 + 8 + 8), However when i use readelf to print out the sections headers of an elf file, &amp; then inspect the &quot;EntSize&quot; (entry size) member of the symbol table section header, it reads that the symbol entries are in fact only hex 0x18 (dec 24) in size.</p>
  <p>I have attached a picture of readelfs output next to the oracle documentation. The highlighted characters under &quot;SYMTAB&quot; is the &quot;EntSize&quot; member.
  <a href="https://i.stack.imgur.com/VsqUO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VsqUO.png" alt="enter image description here" /></a></p>
  <p>As i am about to write an ELF parser i am curious as to which i should believe? the read value of the EntSize member or the documentation?</p>
  <p>I have also attempted to look for an answer in <a href="https://refspecs.linuxfoundation.org/elf/elf.pdf" rel="nofollow noreferrer">this</a> ELF documentation however it doesn't seem to go into any detail of the 64 bit ELF structures.</p>
  <p>It should be noted that the ELF file i run readelf on, in the above picture, is a 64bit executable</p>