aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-08-02 10:08:02 +0000
committerAlan Modra <amodra@gmail.com>2010-08-02 10:08:02 +0000
commit85cfcbfb1a3bce62a3537eb7480ef1116f4c0d94 (patch)
tree6cf0a889bbe77f5d0aaf9a4aa9e433a3764a05c0 /bfd/elf.c
parenta8df5856e2174b21c341d926068f195624d5d089 (diff)
downloadgdb-85cfcbfb1a3bce62a3537eb7480ef1116f4c0d94.zip
gdb-85cfcbfb1a3bce62a3537eb7480ef1116f4c0d94.tar.gz
gdb-85cfcbfb1a3bce62a3537eb7480ef1116f4c0d94.tar.bz2
PR 11866
* elf.c (assign_file_positions_for_load_sections): Use p_vaddr to calculate off_adjust rather than first section vma.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index e7651ba..90fc3d1 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -4337,7 +4337,7 @@ assign_file_positions_for_load_sections (bfd *abfd,
break;
}
- off_adjust = vma_page_aligned_bias (m->sections[0]->vma, off, align);
+ off_adjust = vma_page_aligned_bias (p->p_vaddr, off, align);
off += off_adjust;
if (no_contents)
{