aboutsummaryrefslogtreecommitdiff
path: root/gold/expression.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/expression.cc')
-rw-r--r--gold/expression.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/gold/expression.cc b/gold/expression.cc
index d764cc2..bbfaa1e 100644
--- a/gold/expression.cc
+++ b/gold/expression.cc
@@ -206,6 +206,14 @@ class Symbol_expression : public Expression
value(const Expression_eval_info*);
void
+ set_expr_sym_in_real_elf(Symbol_table* symtab) const
+ {
+ Symbol* sym = symtab->lookup(this->name_.c_str());
+ if (sym != NULL)
+ sym->set_in_real_elf();
+ }
+
+ void
print(FILE* f) const
{ fprintf(f, "%s", this->name_.c_str()); }
@@ -318,6 +326,10 @@ class Unary_expression : public Expression
arg_print(FILE* f) const
{ this->arg_->print(f); }
+ void
+ set_expr_sym_in_real_elf(Symbol_table* symtab) const
+ { return this->arg_->set_expr_sym_in_real_elf(symtab); }
+
private:
Expression* arg_;
};
@@ -437,6 +449,13 @@ class Binary_expression : public Expression
fprintf(f, ")");
}
+ void
+ set_expr_sym_in_real_elf(Symbol_table* symtab) const
+ {
+ this->left_->set_expr_sym_in_real_elf(symtab);
+ this->right_->set_expr_sym_in_real_elf(symtab);
+ }
+
private:
Expression* left_;
Expression* right_;
@@ -622,6 +641,14 @@ class Trinary_expression : public Expression
arg3_print(FILE* f) const
{ this->arg3_->print(f); }
+ void
+ set_expr_sym_in_real_elf(Symbol_table* symtab) const
+ {
+ this->arg1_->set_expr_sym_in_real_elf(symtab);
+ this->arg2_->set_expr_sym_in_real_elf(symtab);
+ this->arg3_->set_expr_sym_in_real_elf(symtab);
+ }
+
private:
Expression* arg1_;
Expression* arg2_;