Fix for elf_getdata/elf_flagdata on empty section