VMA section overlap warnings for overlays
Alan Modra
amodra@gmail.com
Fri Jul 16 10:04:00 GMT 2010
On Fri, Jul 16, 2010 at 09:39:16AM +0200, Andreas Schwab wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
> > Why does an empty section affect section layout?
>
> ??? That's the bug.
I think we could probably remove all the sh_size != 0 tests associated
with ELF_SECTION_IN_SEGMENT in elf.c. I'm not sure why they were
there in the first place, possibly to cover bugs in the precursors to
ELF_SECTION_IN_SEGMENT.
If we do that, then any zero size load/alloc sections will be added to
a segment map by copy_elf_program_header for objcopy and strip, just
as they are for ld. Then the zero size sections will be handled by
assign_file_positions_for_load_sections and placed with other load
sections, rather than being shunted off to
assign_file_positions_for_non_load_sections.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list