rx: Fix p_vaddr reconstruction logic.
authorDJ Delorie <dj@redhat.com>
Tue, 8 Dec 2015 06:15:58 +0000 (01:15 -0500)
committerDJ Delorie <dj@redhat.com>
Tue, 8 Dec 2015 06:15:58 +0000 (01:15 -0500)
* elf32-rx.c (rx_elf_object_p): Ignore empty and nobits sections.

bfd/ChangeLog
bfd/elf32-rx.c

index 90b61db709c4964db8a91af616ffb479a5158d06..180f363dc54dee6eabe6f4c458d61740d10a5bd9 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-08  DJ Delorie  <dj@redhat.com>
+
+       * elf32-rx.c (rx_elf_object_p): Ignore empty and nobits sections.
+
 2015-12-07  Nick Clifton  <nickc@redhat.com>
 
        * elf32-rx.c (elf32_rx_relax_delete_bytes): Add extra parameter -
index 004d7c2dc87fe4ceea454dc53550ad241b012c1b..0fe853da93277cfcccdaabe1115a18178e347211 100644 (file)
@@ -3229,6 +3229,8 @@ rx_elf_object_p (bfd * abfd)
 
          if (phdr[i].p_filesz
              && phdr[i].p_offset <= (bfd_vma) sec->sh_offset
+             && sec->sh_size > 0
+             && sec->sh_type != SHT_NOBITS
              && (bfd_vma)sec->sh_offset <= phdr[i].p_offset + (phdr[i].p_filesz - 1))
            {
              /* Found one!  The difference between the two addresses,
This page took 0.030496 seconds and 4 git commands to generate.