mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* symtab.h (class Symbol_table): Add enum Defined.
* resolve.cc (Symbol_table::should_override): Add defined parameter. Change all callers. Test whether object is NULL before calling a method on it. (Symbol_table::report_resolve_problem): Add defined parameter. Change all callers. (Symbol_table::should_override_with_special): Likewise. * symtab.cc (Symbol_table::define_in_output_data): Add defined parameter. Change all callers. (Symbol_table::do_define_in_output_data): Likewise. (Symbol_table::define_in_output_segment): Likewise. (Symbol_table::do_define_in_output_segment): Likewise. (Symbol_table::define_as_constant): Likewise. (Symbol_table::do_define_as_constant): Likewise. * script.h (class Symbol_assignment): Add is_defsym parameter to constructor; change all callers. * script.cc (Script_options::add_symbol_assignment): Add is_defsym parameter. Change all callers. Add is_defsym_ field. (class Parser_closure): Add parsing_defsym parameter to constructor; change all callers. Add parsing_defsym accessor function. Add parsing_defsym_ field.
This commit is contained in:
@@ -200,10 +200,10 @@ class Version_script_info
|
||||
class Symbol_assignment
|
||||
{
|
||||
public:
|
||||
Symbol_assignment(const char* name, size_t namelen, Expression* val,
|
||||
bool provide, bool hidden)
|
||||
: name_(name, namelen), val_(val), provide_(provide), hidden_(hidden),
|
||||
sym_(NULL)
|
||||
Symbol_assignment(const char* name, size_t namelen, bool is_defsym,
|
||||
Expression* val, bool provide, bool hidden)
|
||||
: name_(name, namelen), val_(val), is_defsym_(is_defsym),
|
||||
provide_(provide), hidden_(hidden), sym_(NULL)
|
||||
{ }
|
||||
|
||||
// Add the symbol to the symbol table.
|
||||
@@ -246,6 +246,9 @@ class Symbol_assignment
|
||||
std::string name_;
|
||||
// Expression to assign to symbol.
|
||||
Expression* val_;
|
||||
// True if this symbol is defined by a --defsym, false if it is
|
||||
// defined in a linker script.
|
||||
bool is_defsym_;
|
||||
// Whether the assignment should be provided (only set if there is
|
||||
// an undefined reference to the symbol.
|
||||
bool provide_;
|
||||
@@ -298,8 +301,8 @@ class Script_options
|
||||
|
||||
// Add a symbol to be defined.
|
||||
void
|
||||
add_symbol_assignment(const char* name, size_t length, Expression* value,
|
||||
bool provide, bool hidden);
|
||||
add_symbol_assignment(const char* name, size_t length, bool is_defsym,
|
||||
Expression* value, bool provide, bool hidden);
|
||||
|
||||
// Add an assertion.
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user