This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Overlay related symbols: load_start_xxx, load_stop_xxx
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Tue, 20 Feb 2007 10:21:08 +1030
- Subject: Overlay related symbols: load_start_xxx, load_stop_xxx
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