X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Fscript.cc;h=d88758d077c54f438457c58c573e80063b78550c;hb=20955c7cb8aebd8d900441c6ff87df2123e38f54;hp=db243cf435aa5c6eb01820706bc807df1f89e14e;hpb=219d1afa89d0d53ca93a684cac341f16470f3ca0;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/script.cc b/gold/script.cc index db243cf435..d88758d077 100644 --- a/gold/script.cc +++ b/gold/script.cc @@ -1,6 +1,6 @@ // script.cc -- handle linker scripts for gold. -// Copyright (C) 2006-2018 Free Software Foundation, Inc. +// Copyright (C) 2006-2020 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -1112,6 +1112,29 @@ Script_options::is_pending_assignment(const char* name) return false; } +// Populates the set with symbols defined in defsym LHS. + +void Script_options::find_defsym_defs(Unordered_set& defsym_set) +{ + for (Symbol_assignments::const_iterator p = this->symbol_assignments_.begin(); + p != this->symbol_assignments_.end(); + ++p) + { + defsym_set.insert((*p)->name()); + } +} + +void +Script_options::set_defsym_uses_in_real_elf(Symbol_table* symtab) const +{ + for (Symbol_assignments::const_iterator p = this->symbol_assignments_.begin(); + p != this->symbol_assignments_.end(); + ++p) + { + (*p)->value()->set_expr_sym_in_real_elf(symtab); + } +} + // Add a symbol to be defined. void