The PN_XNUM is a necessary condition for reading shdr0 regardless of the value of e_shoff. Without this, readShdrZero falsely returns the garbage value in ELF header instead of emitting warning.
The PN_XNUM is a necessary condition for reading shdr0 regardless of the value of e_shoff. Without this, readShdrZero falsely returns the garbage value in ELF header instead of emitting warning.