From 85cfcbfb1a3bce62a3537eb7480ef1116f4c0d94 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 2 Aug 2010 10:08:02 +0000 Subject: [PATCH] PR 11866 * elf.c (assign_file_positions_for_load_sections): Use p_vaddr to calculate off_adjust rather than first section vma. --- bfd/ChangeLog | 6 ++++++ bfd/elf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9b4223f..e44b642 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2010-08-02 Alan Modra + + PR 11866 + * elf.c (assign_file_positions_for_load_sections): Use p_vaddr to + calculate off_adjust rather than first section vma. + 2010-07-30 H.J. Lu * elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info. 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) { -- 2.7.4