aboutsummaryrefslogtreecommitdiff
path: root/gold/ChangeLog
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2015-08-25 17:41:19 -0700
committerCary Coutant <ccoutant@gmail.com>2015-08-25 18:11:19 -0700
commit1757d35c8a35d77fd631705589024456c6030966 (patch)
tree6b9cfb352abc1980b94d9bc7c9dbe89e8ceba4c8 /gold/ChangeLog
parent3ac0a36c297a7bb3325c6efa756cccc40572dbdb (diff)
downloadgdb-1757d35c8a35d77fd631705589024456c6030966.zip
gdb-1757d35c8a35d77fd631705589024456c6030966.tar.gz
gdb-1757d35c8a35d77fd631705589024456c6030966.tar.bz2
Fix internal error in gold when script uses section address in assignment.
When processing assignment expressions in a linker script, gold processes absolute assignments early, but when one of those assignments involves the address of a section that has not yet been finalized, we get an internal error in address. This patch fixes the problem by gracefully returning from expression evaluation even if the address is not yet valid, and deferring the assignment in such a case. gold/ PR gold/14746 * expression.cc (Expression::Expression_eval_info): Add is_valid_pointer field. (Expression::eval_maybe_dot): Add is_valid_pointer parameter. Adjust all callers. (Addr_expression::value_from_output_section): Check whether address is valid. * script.cc (Symbol_assignment::set_if_absolute): Defer assignment if evaluation failed due to address that is not yet valid. * script.h: (Expression::eval_maybe_dot): Add is_valid_pointer parameter.
Diffstat (limited to 'gold/ChangeLog')
-rw-r--r--gold/ChangeLog14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 5190e7e..ebed52b 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,19 @@
2015-08-25 Cary Coutant <ccoutant@gmail.com>
+ PR gold/14746
+ * expression.cc (Expression::Expression_eval_info): Add
+ is_valid_pointer field.
+ (Expression::eval_maybe_dot): Add is_valid_pointer parameter.
+ Adjust all callers.
+ (Addr_expression::value_from_output_section): Check whether address
+ is valid.
+ * script.cc (Symbol_assignment::set_if_absolute): Defer assignment
+ if evaluation failed due to address that is not yet valid.
+ * script.h: (Expression::eval_maybe_dot): Add is_valid_pointer
+ parameter.
+
+2015-08-25 Cary Coutant <ccoutant@gmail.com>
+
PR gold/18866
PR gold/18703
* symtab.cc (Symbol_table): Reorder conditions to avoid internal error.