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: VMA section overlap warnings for overlays


On Thu, Jul 15, 2010 at 10:11:03AM +0200, Andreas Schwab wrote:
> Alan Modra <amodra@gmail.com> writes:
> 
> > @@ -5837,7 +5853,8 @@ copy_elf_program_header (bfd *ibfd, bfd 
> >  	   section = section->next)
> >  	{
> >  	  this_hdr = &(elf_section_data(section)->this_hdr);
> > -	  if (ELF_IS_SECTION_IN_SEGMENT_FILE (this_hdr, segment))
> > +	  if (this_hdr->sh_size != 0
> > +	      && ELF_SECTION_IN_SEGMENT (this_hdr, segment))
> 
> Why can't an empty section never be part of a segment?

Good question.  I didn't change anything with that patch.
HJ's ELF_IS_SECTION_IN_SEGMENT_FILE included the sh_size check.

-- 
Alan Modra
Australia Development Lab, IBM


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