Some ELF files include a .rela section with size 0 instead of simply not including the section. This caused issues with the parser, since bytes.pread_with(offset, filesz) would try and read 0 bytes from a 0-length buffer, which returned an error. This workaround simply swaps out the value with the entire input when filesz is 0; this is the smallest change that appears to work, since count will then be set to 0. This could also be worked around by adding a check in elf.mod (or many other methods), but I thought that it was better to allow the parser to handle 0-sized sections.
Some ELF files include a .rela section with size 0 instead of simply not including the section. This caused issues with the parser, since bytes.pread_with(offset, filesz) would try and read 0 bytes from a 0-length buffer, which returned an error. This workaround simply swaps out the value with the entire input when filesz is 0; this is the smallest change that appears to work, since count will then be set to 0. This could also be worked around by adding a check in elf.mod (or many other methods), but I thought that it was better to allow the parser to handle 0-sized sections.