This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: p_vaddr_offset vs lma


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]