diff options
author | DJ Delorie <dj@redhat.com> | 2012-05-11 00:01:58 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2012-05-11 00:01:58 +0000 |
commit | 74b1e045f3883b1b07ca5f8f83e7a97948891973 (patch) | |
tree | 2a4d58d88d68333dea741b530323bb4231e0ec89 /bfd | |
parent | 099c90c425d6851229696040b52c82a773404a84 (diff) | |
download | gdb-74b1e045f3883b1b07ca5f8f83e7a97948891973.zip gdb-74b1e045f3883b1b07ca5f8f83e7a97948891973.tar.gz gdb-74b1e045f3883b1b07ca5f8f83e7a97948891973.tar.bz2 |
* elf32-rx.c (rx_elf_object_p): Ignore empty segments.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf32-rx.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a46ed85..806db7f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2012-05-10 DJ Delorie <dj@redhat.com> + + * elf32-rx.c (rx_elf_object_p): Ignore empty segments. + 2012-05-10 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c index e74f546..d3b71c3 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); |