This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: p_vaddr_offset vs lma
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: binutils at sourceware dot org, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Mon, 02 Jul 2007 11:55:43 +0100
- Subject: Re: p_vaddr_offset vs lma
- References: <20070702064710.GG497@bubble.grove.modra.org>
Alan Modra wrote:
Nathan, would you mind checking that this fix for your
http://sourceware.org/ml/binutils/2006-12/msg00165.html change doesn't
break your test files, if you have them around still?
PR 4712
* elf.c (assign_file_positions_for_load_sections): Adjust lma
by p_vaddr_offset.
This is odd, my copy of bfd/elf.c has some duplicated code with that change
already there:
if (m->count == 0)
p->p_vaddr = 0;
else
p->p_vaddr = m->sections[0]->vma - m->p_vaddr_offset;
if (m->p_paddr_valid)
p->p_paddr = m->p_paddr;
else if (m->count == 0)
p->p_paddr = 0;
else
p->p_paddr = m->sections[0]->lma - m->p_vaddr_offset;
diff tells me I've not changed it.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk