aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-rx.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2015-12-08 01:15:58 -0500
committerDJ Delorie <dj@redhat.com>2015-12-08 01:15:58 -0500
commit7859afc4fa05f6876c4e6b95cfb8fc252efd96bc (patch)
treee4666347c6ddb898b202368e9c9d2691f0dc854f /bfd/elf32-rx.c
parent1eac08cc37b3d8a42a1b81de888b29d079b0608e (diff)
downloadgdb-7859afc4fa05f6876c4e6b95cfb8fc252efd96bc.zip
gdb-7859afc4fa05f6876c4e6b95cfb8fc252efd96bc.tar.gz
gdb-7859afc4fa05f6876c4e6b95cfb8fc252efd96bc.tar.bz2
rx: Fix p_vaddr reconstruction logic.
* elf32-rx.c (rx_elf_object_p): Ignore empty and nobits sections.
Diffstat (limited to 'bfd/elf32-rx.c')
-rw-r--r--bfd/elf32-rx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c
index 004d7c2..0fe853d 100644
--- a/bfd/elf32-rx.c
+++ b/bfd/elf32-rx.c
@@ -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,