This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Patch to the way BFD reads overlaid ELF sections
On Fri, May 03, 2002 at 03:58:14PM +0100, Richard Sandiford wrote:
> OK, I can see it makes sense when a section belongs to a segment with
> non-zero file size. I'm just not sure what it means when the segment
> file size is zero.
Neither am I. :)
> After the patch we'd only consider segments 2 and 3 to match
> offset-wise. We still need the VMA check to distinguish
> between them.
I still don't like removing the p_memsz test, even though I can't
immediately think of a case where removing it would cause a
problem.
One way of solving the problem you found with zero file size overlay
sections, would be to keep track of section assignments to segments
via another elf_tdata structure, and not reassign to the same place.
Whether it's worth doing is debatable..
--
Alan Modra
IBM OzLabs - Linux Technology Centre