diff options
author | Nick Clifton <nickc@redhat.com> | 2012-02-22 16:27:35 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2012-02-22 16:27:35 +0000 |
commit | 2aa9aad989850c1a650701e507266edbad9864d2 (patch) | |
tree | 58c7e42987e3dab1fce130a5f589e0f74aafc031 /ld/ldexp.c | |
parent | feea76c262d1d0ef709ad2edfa4b048f7733f847 (diff) | |
download | binutils-gdb-2aa9aad989850c1a650701e507266edbad9864d2.tar.gz |
PR ld/13683
* ldlang.c (lang_process): Rerun lang_do_assignments before
starting garbage collection.
* ldexp.c (fold_name): Generate a reloc for defined symbols
found without an associated output section during the mark phase.
(exp_fold_tree_1): Continue processing an expression, even if we
are unable to fold it, if we are in the first two evaluation
phases.
* ldexp.h (enum lang_phase_type): Add descriptions of the phases.
* ld-gc/pr13683.c: New test source file.
* ld-gc/pr13683.d: New test control and output file.
* ld-gc/gc.exp: Run the pr13683 test.
* ld-cris/tls-gc-68: Update expected symbol table dump.
* ld-cris/tls-gc-69: Likewise.
* ld-cris/tls-gc-70: Likewise.
* ld-cris/tls-gc-71: Likewise.
* ld-cris/tls-gc-75: Likewise.
* ld-cris/tls-gc-76.d: Likewise.
* ld-cris/tls-gc-79.d: Likewise.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r-- | ld/ldexp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c index 293d28a98c0..bf0e00b1796 100644 --- a/ld/ldexp.c +++ b/ld/ldexp.c @@ -590,7 +590,9 @@ fold_name (etree_type *tree) output_section = h->u.def.section->output_section; if (output_section == NULL) { - if (expld.phase != lang_mark_phase_enum) + if (expld.phase == lang_mark_phase_enum) + new_rel (h->u.def.value, h->u.def.section); + else einfo (_("%X%S: unresolvable symbol `%s'" " referenced in expression\n"), tree, tree->name.name); @@ -882,7 +884,7 @@ exp_fold_tree_1 (etree_type *tree) exp_fold_tree_1 (tree->assign.src); if (expld.result.valid_p - || (expld.phase == lang_first_phase_enum + || (expld.phase <= lang_mark_phase_enum && tree->type.node_class == etree_assign && tree->assign.hidden)) { |