diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1008a6619a..bcfae55e8b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2010-03-17 Jie Zhang + + * elf.c (assign_file_positions_for_load_sections): Avoid + overflow. + 2010-03-17 Alan Modra * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using diff --git a/bfd/elf.c b/bfd/elf.c index dbb13d4d76..cee9b7a445 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -4452,7 +4452,7 @@ assign_file_positions_for_load_sections (bfd *abfd, { bfd_signed_vma adjust = sec->vma - (p->p_vaddr + p->p_memsz); - if (adjust < 0) + if (sec->vma < p->p_vaddr + p->p_memsz) { (*_bfd_error_handler) (_("%B: section %A vma 0x%lx overlaps previous sections"),