diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-06-04 14:40:21 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-06-04 14:40:21 +0000 |
commit | 079f985c5a34b0c69d7f9662fc3d952cba301c05 (patch) | |
tree | d485b37ca033859876a629e076522cc16716faff /ld/ldexp.c | |
parent | 6a86118a50c3f67c313f1b71790cf7c5d27666b0 (diff) | |
download | gdb-079f985c5a34b0c69d7f9662fc3d952cba301c05.zip gdb-079f985c5a34b0c69d7f9662fc3d952cba301c05.tar.gz gdb-079f985c5a34b0c69d7f9662fc3d952cba301c05.tar.bz2 |
2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
PR 992
* ldexp.c (exp_mark_used_section): Set SEC_KEEP on current
section for etree_assign, etree_provide and etree_provided.
Call fold_binary on etree_binary.
* ldlang.c (lang_mark_used_section_1): Handle load base.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r-- | ld/ldexp.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1217,6 +1217,8 @@ align_n (bfd_vma value, bfd_vma align) void exp_mark_used_section (etree_type *tree, asection *current_section) { + bfd_vma dot = 0; + switch (tree->type.node_class) { case etree_value: @@ -1232,6 +1234,8 @@ exp_mark_used_section (etree_type *tree, asection *current_section) break; case etree_binary: + fold_binary (tree, current_section, lang_allocating_phase_enum, + dot, &dot, TRUE); break; case etree_trinary: @@ -1243,12 +1247,13 @@ exp_mark_used_section (etree_type *tree, asection *current_section) if (tree->assign.dst[0] != '.' || tree->assign.dst[1] != 0) { etree_value_type result; - bfd_vma dot = 0; result = exp_fold_tree_1 (tree->assign.src, current_section, lang_allocating_phase_enum, dot, &dot, TRUE); + if (current_section != bfd_abs_section_ptr) + current_section->flags |= SEC_KEEP; if (result.valid_p) { bfd_boolean create; |