Patch to fix problems with memory regions and OVERLAYs
Alan Modra
amodra@bigpond.net.au
Wed May 1 18:09:00 GMT 2002
On Wed, May 01, 2002 at 07:05:45PM +0100, Richard Sandiford wrote:
> [ld/]
> * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.
> (lang_enter_overlay): Remove the last two parameters.
> (lang_leave_overlay): Take them here instead.
> * ldgram.y (memspec_at_opt): Set $$ to null if no region is given.
> (section): Pass LMA and crossref flag to lang_leave_overlay rather
> than lang_enter_overlay.
> * ldlang.c (lang_memory_region_lookup): Return null for null names.
> (lang_output_section_statement_lookup): Initialize update_dot_tree.
> (lang_size_sections_1): Evaluate it.
> (lang_leave_output_section_statement): Rework LMA lookup.
> (overlay_lma, overlay_nocrossrefs): Remove.
> (lang_enter_overlay): Remove LMA and corssref arguments.
> (lang_enter_overlay_section): Don't set the LMA here.
> (lang_leave_overlay): Take LMA and crossref arguments. Move the '.'
> assignment to the last section's update_dot_tree. Unconditionally
> use the load and run-time regions specified in the OVERLAY statement.
> Likewise the first section's LMA. Only set the other sections' LMAs
> when no load region is given.
>
> [ld/testsuite/]
> * lib/ld-lib.exp (run_dump_test): Add -L$srcdir/$subdir.
> (is_elf_format): New, extracted from...
> * ld-scripts/weak.exp: ...here.
> * ld-scripts/overlay-size.exp: New test.
> * ld-scripts/overlay-size.[tsd],
> * ld-scripts/overlay-size-map.d: New files for it.
Looks reasonable to me.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list