aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-rx.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2013-01-29 22:17:53 +0000
committerDJ Delorie <dj@redhat.com>2013-01-29 22:17:53 +0000
commit392ca752084a7ea99a345a7b19b9e7453f2ea6a2 (patch)
tree7a8114492181247393bd06b3df5e98f9cb4e4598 /bfd/elf32-rx.c
parent8d9878a4ca345aef7d7a727a11e7f76de787bac0 (diff)
downloadgdb-392ca752084a7ea99a345a7b19b9e7453f2ea6a2.zip
gdb-392ca752084a7ea99a345a7b19b9e7453f2ea6a2.tar.gz
gdb-392ca752084a7ea99a345a7b19b9e7453f2ea6a2.tar.bz2
* config/tc-rl78.c (rl78_cons_fix_new): Handle user-specified
relocs in .word/.etc statements.
Diffstat (limited to 'bfd/elf32-rx.c')
-rw-r--r--bfd/elf32-rx.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c
index 5000eb7..8b61142 100644
--- a/bfd/elf32-rx.c
+++ b/bfd/elf32-rx.c
@@ -3098,9 +3098,15 @@ rx_elf_object_p (bfd * abfd)
{
Elf_Internal_Shdr *sec = elf_tdata(abfd)->elf_sect_ptr[u];
+<<<<<<< elf32-rx.c
+ if (phdr[i].p_offset <= (bfd_vma) sec->sh_offset
+ && (bfd_vma)sec->sh_offset <= phdr[i].p_offset + (phdr[i].p_filesz - 1)
+ && sec->sh_size > 0)
+=======
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))
+>>>>>>> 1.20
{
/* Found one! The difference between the two addresses,
plus the difference between the two file offsets, is
@@ -3113,7 +3119,7 @@ rx_elf_object_p (bfd * abfd)
The correct LMA for the section is fffc0140 + (2050-2010).
*/
- phdr[i].p_vaddr = sec->sh_addr + (sec->sh_offset - phdr[i].p_offset);
+ phdr[i].p_vaddr = sec->sh_addr - (sec->sh_offset - phdr[i].p_offset);
break;
}
}
@@ -3123,9 +3129,15 @@ rx_elf_object_p (bfd * abfd)
bsec = abfd->sections;
while (bsec)
{
+<<<<<<< elf32-rx.c
+ if (bsec->flags & (SEC_LOAD | SEC_ALLOC)
+ && phdr[i].p_offset <= (bfd_vma) bsec->filepos
+ && (bfd_vma) bsec->filepos <= phdr[i].p_offset + (phdr[i].p_filesz - 1))
+=======
if (phdr[i].p_filesz
&& phdr[i].p_vaddr <= bsec->vma
&& bsec->vma <= phdr[i].p_vaddr + (phdr[i].p_filesz - 1))
+>>>>>>> 1.20
{
bsec->lma = phdr[i].p_paddr + (bsec->vma - phdr[i].p_vaddr);
}