VMA section overlap warnings for overlays
H.J. Lu
hjl.tools@gmail.com
Thu Feb 24 23:49:00 GMT 2011
On Tue, Jul 20, 2010 at 7:10 AM, Alan Modra <amodra@gmail.com> wrote:
> This removes all the special treatment for zero size sections when
> using ELF_SECTION_IN_SEGMENT in elf.c, and makes readelf display
> section to segment mapping for zero size sections. I chose to not
> include a zero size section in readelf's mapping if the section was at
> the end of a segment. eg. if the segment covers 0x1000 to 0x1fff,
> then a zero sized section located at 0x2000 is not shown as part of
> the segment. That seems reasonable to me, but I'm open to
> suggestions. I'll note that omitting sections like this in elf.c, ie.
> using ELF_SECTION_IN_SEGMENT_STRICT there, causes testsuite failures
> on x86. A zero length .got.plt sometimes ends up as the last section
> mapped to a load segment.
>
> include/elf/
> * internal.h (ELF_TBSS_SPECIAL): New macro, extracted from..
> (ELF_SECTION_SIZE): ..here.
> (ELF_SECTION_IN_SEGMENT_1): Add "strict" arg.
> (ELF_SECTION_IN_SEGMENT_STRICT): New macro.
> bfd/
> * elf.c (assign_file_positions_for_load_sections): Check that
> zero size sections are allocated in segments too.
> (assign_file_positions_for_non_load_sections): Warn if zero
> size alloc sections are found here.
> (copy_elf_program_header): Don't drop zero size sections from
> segment map.
> (copy_private_bfd_data): Check for changes in zero size sections.
> binutils/
> * readelf.c (process_program_headers): Don't ignore all zero size
> sections.
> ld/testsuite/
> * ld-powerpc/tlsexe.r: Update.
> * ld-powerpc/tlsexetoc.r: Update.
> * ld-powerpc/tlsso.r: Update.
> * ld-powerpc/tlstocso.r: Update.
>
This may have caused:
http://sourceware.org/bugzilla/show_bug.cgi?id=12516
--
H.J.
More information about the Binutils
mailing list