mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
PR ld/12001
* ldlang.c (ldlang_def_chain_list): New variable. Contains a list
of symbols defined via the --defsym command line option and
currently waiting assignment.
(insert_defined): Add a defined symbol to the symbol table.
(ldlang_add_def): Add a entry to the ldlang_def_chain_list.
(lang_place_defineds): Walk ldlang_def_chain_list defining the
symbols.
(lang_process): Call lang_place_defineds.
(lang_add_assignment): If the assignment has come from a --defsym
command line option then call lang_add_def.
* ld-script/default-script2.d: Fix expected address for text
section.
PR gold/12001
* script.h (class Symbol_assignment: name): New member. Returns
the name of the symbol.
* scrfipt.cc (Script_options::is_pending_assignment): New member.
Returns true if the given symbol name is on the list of
assignments wating to be processed.
* archive.cc (should_incldue_member): If the symbol is undefined,
check to see if it is on the list of symbols pending assignment.
This commit is contained in:
@@ -345,6 +345,10 @@ class Symbol_assignment
|
||||
set_if_absolute(Symbol_table*, const Layout*, bool is_dot_available,
|
||||
uint64_t dot_value);
|
||||
|
||||
const std::string&
|
||||
name() const
|
||||
{ return this->name_; }
|
||||
|
||||
// Print the assignment to the FILE. This is for debugging.
|
||||
void
|
||||
print(FILE*) const;
|
||||
@@ -423,6 +427,10 @@ class Script_options
|
||||
add_symbol_assignment(const char* name, size_t length, bool is_defsym,
|
||||
Expression* value, bool provide, bool hidden);
|
||||
|
||||
// Look for an assigned symbol.
|
||||
bool
|
||||
is_pending_assignment(const char* name);
|
||||
|
||||
// Add a reference to a symbol.
|
||||
void
|
||||
add_symbol_reference(const char* name, size_t length);
|
||||
|
||||
Reference in New Issue
Block a user