From 41eac08e8cdad7297284a653f900c2fedaee622f Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 11 May 2012 00:01:58 +0000 Subject: * elf32-rx.c (rx_elf_object_p): Ignore empty segments. --- bfd/elf32-rx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bfd/elf32-rx.c') diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c index e74f5465d9..d3b71c317e 100644 --- a/bfd/elf32-rx.c +++ b/bfd/elf32-rx.c @@ -3060,7 +3060,8 @@ rx_elf_object_p (bfd * abfd) { Elf_Internal_Shdr *sec = elf_tdata(abfd)->elf_sect_ptr[u]; - if (phdr[i].p_offset <= (bfd_vma) sec->sh_offset + if (phdr[i].p_filesz + && phdr[i].p_offset <= (bfd_vma) sec->sh_offset && (bfd_vma)sec->sh_offset <= phdr[i].p_offset + (phdr[i].p_filesz - 1)) { /* Found one! The difference between the two addresses, @@ -3084,7 +3085,8 @@ rx_elf_object_p (bfd * abfd) bsec = abfd->sections; while (bsec) { - if (phdr[i].p_vaddr <= bsec->vma + if (phdr[i].p_filesz + && phdr[i].p_vaddr <= bsec->vma && bsec->vma <= phdr[i].p_vaddr + (phdr[i].p_filesz - 1)) { bsec->lma = phdr[i].p_paddr + (bsec->vma - phdr[i].p_vaddr); -- cgit v1.2.1