summaryrefslogtreecommitdiff
path: root/ld/ldexp.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-01-28 09:59:29 +1030
committerAlan Modra <amodra@gmail.com>2019-01-28 09:59:29 +1030
commit6a84624340dd19ccd927d91d79e0ece135c6d846 (patch)
treeeafcd04a1374596f537457ef8f2f7d61cf50db9d /ld/ldexp.h
parente044973b0cadb4c36c2a2c11e908d758b8cd75f9 (diff)
downloadbinutils-gdb-6a84624340dd19ccd927d91d79e0ece135c6d846.tar.gz
PR24008, Wrong value of ternary expression in map file
PR 24008 * ldexp.h (lang_phase_type): Add lang_fixed_phase_enum. * ldexp.c (fold_name): Move expld.assign_name check later to avoid an extra lookup. (exp_fold_tree_1): When lang_fixed_phase_enum, don't change symbol values, and don't clear expld.assign_name. * ldlang.c (lang_map): Set expld.phase to lang_fixed_phase_enum. (print_assignment): Resolve entire assignment expression. Don't access symbol u.def unless symbol is defined.
Diffstat (limited to 'ld/ldexp.h')
-rw-r--r--ld/ldexp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/ldexp.h b/ld/ldexp.h
index 8dc1bf941f3..71395bc6c46 100644
--- a/ld/ldexp.h
+++ b/ld/ldexp.h
@@ -106,7 +106,9 @@ typedef enum
/* During assignment of symbol values when relaxation in progress. */
lang_assigning_phase_enum,
/* Final assignment of symbol values. */
- lang_final_phase_enum
+ lang_final_phase_enum,
+ /* Run after symbol values have been fixed, for lang_map. */
+ lang_fixed_phase_enum
} lang_phase_type;
union lang_statement_union;