diff options
author | Alan Modra <amodra@gmail.com> | 2019-01-28 09:59:29 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-01-28 09:59:29 +1030 |
commit | 6a84624340dd19ccd927d91d79e0ece135c6d846 (patch) | |
tree | eafcd04a1374596f537457ef8f2f7d61cf50db9d /ld/ldexp.h | |
parent | e044973b0cadb4c36c2a2c11e908d758b8cd75f9 (diff) | |
download | gdb-6a84624340dd19ccd927d91d79e0ece135c6d846.zip gdb-6a84624340dd19ccd927d91d79e0ece135c6d846.tar.gz gdb-6a84624340dd19ccd927d91d79e0ece135c6d846.tar.bz2 |
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.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |