+2012-05-09 Roland McGrath <roland@hack.frob.com>
+
+ * elflint (check_sections): Allow zero sized sections at (filesz) end
+ of segment. And make check overflow-proofed.
+
2012-04-24 Mark Wielaard <mjw@redhat.com>
* readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
|| (phdr->p_type == PT_TLS
&& (shdr->sh_flags & SHF_TLS) != 0))
&& phdr->p_offset <= shdr->sh_offset
- && (phdr->p_offset + phdr->p_filesz > shdr->sh_offset
- || (phdr->p_offset + phdr->p_memsz > shdr->sh_offset
+ && ((shdr->sh_offset - phdr->p_offset <= phdr->p_filesz
+ && (shdr->sh_offset - phdr->p_offset < phdr->p_filesz
+ || shdr->sh_size == 0))
+ || (shdr->sh_offset - phdr->p_offset < phdr->p_memsz
&& shdr->sh_type == SHT_NOBITS)))
{
/* Found the segment. */