Overlay related symbols: load_start_xxx, load_stop_xxx

Alan Modra amodra@bigpond.net.au
Tue Feb 20 04:13:00 GMT 2007


This patch makes LOADADDR always return an absolute value, since an
lma really isn't section relative.

	* ldexp.c (fold_name <LOADADDR>): Ensure result is always absolute.

Index: ld/ldexp.c
===================================================================
RCS file: /cvs/src/src/ld/ldexp.c,v
retrieving revision 1.64
diff -u -p -r1.64 ldexp.c
--- ld/ldexp.c	6 Jan 2007 22:03:45 -0000	1.64
+++ ld/ldexp.c	19 Feb 2007 23:48:55 -0000
@@ -485,6 +485,7 @@ fold_name (etree_type *tree)
 	  new_abs (hdr_size);
 	}
       break;
+
     case DEFINED:
       if (expld.phase == lang_first_phase_enum)
 	lang_track_definedness (tree->name.name);
@@ -507,6 +508,7 @@ fold_name (etree_type *tree)
 	  expld.result.valid_p = TRUE;
 	}
       break;
+
     case NAME:
       if (expld.phase == lang_first_phase_enum)
 	;
@@ -591,7 +593,10 @@ fold_name (etree_type *tree)
 	      if (os->load_base == NULL)
 		new_abs (os->bfd_section->lma);
 	      else
-		exp_fold_tree_1 (os->load_base);
+		{
+		  exp_fold_tree_1 (os->load_base);
+		  make_abs ();
+		}
 	    }
 	}
       break;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list