From 9f88b410a04363dbc584211667fcc3b565f37466 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 7 May 2002 11:04:54 +0000 Subject: * 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/ldgram.y | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ld/ldgram.y') diff --git a/ld/ldgram.y b/ld/ldgram.y index 71da62c..3de9326 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -820,7 +820,7 @@ exp : memspec_at_opt: AT '>' NAME { $$ = $3; } - | { $$ = "*default*"; } + | { $$ = 0; } ; opt_at: @@ -851,7 +851,7 @@ section: NAME { ldlex_expression(); } { ldlex_popstate (); ldlex_script (); } '{' { - lang_enter_overlay ($3, $5, (int) $4); + lang_enter_overlay ($3); } overlay_section '}' @@ -859,7 +859,8 @@ section: NAME { ldlex_expression(); } memspec_opt memspec_at_opt phdr_opt fill_opt { ldlex_popstate (); - lang_leave_overlay ($15, $12, $14, $13); + lang_leave_overlay ($5, (int) $4, + $15, $12, $14, $13); } opt_comma | /* The GROUP case is just enough to support the gcc -- cgit v1.1