Simplify PR23110 PE_DEBUG_DATA size checks
authorAlan Modra <amodra@gmail.com>
Tue, 16 Oct 2018 05:59:23 +0000 (16:29 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 16 Oct 2018 06:11:57 +0000 (16:41 +1030)
commit48dcd4ea064ae86364dacbf4dd7f035fba56151c
tree405e2fa19f4a0fcf6cc1df6e509aac447cb99e6c
parent8df73d5cc3a87101f3bd254f33820fcce61bc971
Simplify PR23110 PE_DEBUG_DATA size checks

The negative size check can be rolled into the "exceeds space left in
section" check if that is done using an unsigned comparison.  We know
that "addr - section->vma" is never larger than section->size since
the section is found by find_section_by_vma.

* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Simplify
PE_DEBUG_DATA size checks.
bfd/ChangeLog
bfd/peXXigen.c