This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: VMA section overlap warnings for overlays
- From: Alan Modra <amodra at gmail dot com>
- To: Andreas Schwab <schwab at redhat dot com>
- Cc: David Stubbs <stubbs at IceraSemi dot com>, binutils at sourceware dot org
- Date: Thu, 15 Jul 2010 22:39:55 +0930
- Subject: Re: VMA section overlap warnings for overlays
- References: <4D60B0700D1DB54A8C0C6E9BE69163700E67DFD1@EXCHANGEVS.IceraSemi.local> <20100421082441.GG3510@bubble.grove.modra.org> <4D60B0700D1DB54A8C0C6E9BE69163700E7815C7@EXCHANGEVS.IceraSemi.local> <20100422011106.GI3510@bubble.grove.modra.org> <20100422015303.GK3510@bubble.grove.modra.org> <4D60B0700D1DB54A8C0C6E9BE69163700E7F2F15@EXCHANGEVS.IceraSemi.local> <20100424021750.GQ3510@bubble.grove.modra.org> <m37hkxxizs.fsf@hase.home>
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