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: PATCH: Preserve ELF program header


On Thu, May 25, 2006 at 02:44:16PM -0700, H. J. Lu wrote:
> --- binutils/bfd/elf.c.pagesize	2006-05-22 12:36:40.000000000 -0700
> +++ binutils/bfd/elf.c	2006-05-22 16:24:05.000000000 -0700
> @@ -4292,7 +4292,9 @@ assign_file_positions_for_load_sections 
>  	  return FALSE;
>  	}
>  
> -      if (m->count == 0)
> +      if (m->p_vaddr_valid)
> +	p->p_vaddr = m->p_vaddr;
> +      else if (m->count == 0)
>  	p->p_vaddr = 0;
>        else
>  	p->p_vaddr = m->sections[0]->vma;

I don't see the need for m->p_vaddr and m->p_vaddr_valid.  How can you
get into a situation where m->sections[0]->vma or 0 is not the right
initialisation for p->p_vaddr?

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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