This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: VMA section overlap warnings for overlays
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andreas Schwab <schwab at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, David Stubbs <stubbs at icerasemi dot com>, binutils at sourceware dot org
- Cc: Alan Modra <amodra at gmail dot com>
- Date: Thu, 24 Feb 2011 15:49:25 -0800
- Subject: Re: VMA section overlap warnings for overlays
- References: <m3lj9cx3gr.fsf@hase.home> <AANLkTikCxGTUKa9ovu7sqxD6S3dTY766X1WM-oRrm5Ek@mail.gmail.com> <20100715141753.GI31087@bubble.grove.modra.org> <AANLkTin6LROD7EYNNjVk6z_lflaoyczHpv6iHzSvGW5s@mail.gmail.com> <m3d3uox15y.fsf@hase.home> <AANLkTimsUfwjV0LTKabsdnIhbR1aSFGcJ3VLV8nApK2d@mail.gmail.com> <m34ofzx4d7.fsf@hase.home> <20100716093630.GN31087@bubble.grove.modra.org> <m3tynv7ict.fsf@hase.home> <20100720054451.GF19525@bubble.grove.modra.org> <20100720141031.GI19525@bubble.grove.modra.org>
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.