summaryrefslogtreecommitdiff
path: root/ld/ldexp.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-02-22 16:27:31 +0000
committerNick Clifton <nickc@redhat.com>2012-02-22 16:27:31 +0000
commit0786bd3c43fc3e8860f09fe5af7a9b3cf2564f58 (patch)
tree25ea35e406710a420d7a707d897dfe8691b2f895 /ld/ldexp.h
parentfea0b69c0dd2707aa35522f45510f3cde8f0b372 (diff)
downloadbinutils-redhat-0786bd3c43fc3e8860f09fe5af7a9b3cf2564f58.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.h')
-rw-r--r--ld/ldexp.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ld/ldexp.h b/ld/ldexp.h
index fc7485fc58..586dd13f62 100644
--- a/ld/ldexp.h
+++ b/ld/ldexp.h
@@ -94,11 +94,19 @@ typedef union etree_union {
} assert_s;
} etree_type;
-typedef enum {
+/* Expression evaluation control. */
+typedef enum
+{
+ /* Parsing linker script. Will only return "valid" for expressions
+ that evaluate to a constant. */
lang_first_phase_enum,
+ /* Prior to section sizing. */
lang_mark_phase_enum,
+ /* During section sizing. */
lang_allocating_phase_enum,
+ /* During assignment of symbol values when relaxation in progress. */
lang_assigning_phase_enum,
+ /* Final assignment of symbol values. */
lang_final_phase_enum
} lang_phase_type;