aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-07-26 05:05:52 +0000
committerAlan Modra <amodra@gmail.com>2006-07-26 05:05:52 +0000
commit66e28d60cbc9fcd64aa8e9d8f0c90c5b4debbfc2 (patch)
tree19a50fd9d2f6a3b759faba6d53b8de5345578d39 /ld/ldexp.c
parent329c1c8685cfb81d09ba68bcac765baacd54e71c (diff)
downloadbinutils-66e28d60cbc9fcd64aa8e9d8f0c90c5b4debbfc2.zip
binutils-66e28d60cbc9fcd64aa8e9d8f0c90c5b4debbfc2.tar.gz
binutils-66e28d60cbc9fcd64aa8e9d8f0c90c5b4debbfc2.tar.bz2
* ldexp.c (fold_name <LOADADDR>): Use the lma.
* ldlang.h (lang_memory_region_type): Delete old_length. Add last_os. * ldlang.c (lang_memory_region_lookup): Init new field. (lang_reset_memory_regions): Reset new field. (lang_insert_orphan): Don't set load_base. (lang_leave_overlay): Likewise. (lang_size_sections_1): Delete unnecessary code setting lma_region to region. Correct lma region check. (lang_do_assignments_1): Rename output_section_statement parm to current_os. Set lma from previous section in region.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 0c7a9b0..71f4c8e 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -577,7 +577,8 @@ fold_name (etree_type *tree)
if (os != NULL && os->processed)
{
if (os->load_base == NULL)
- new_rel (0, NULL, os->bfd_section);
+ new_rel (os->bfd_section->lma - os->bfd_section->vma,
+ NULL, os->bfd_section);
else
exp_fold_tree_1 (os->load_base);
}