diff options
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 1a69f5b..4e8afb1 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -527,6 +527,31 @@ Symbol::set_output_section(Output_section* os) } } +// Set the symbol's output segment. This is used for pre-defined +// symbols whose segments aren't known until after layout is done +// (e.g., __ehdr_start). + +void +Symbol::set_output_segment(Output_segment* os, Segment_offset_base base) +{ + gold_assert(this->is_predefined_); + this->source_ = IN_OUTPUT_SEGMENT; + this->u_.in_output_segment.output_segment = os; + this->u_.in_output_segment.offset_base = base; +} + +// Set the symbol to undefined. This is used for pre-defined +// symbols whose segments aren't known until after layout is done +// (e.g., __ehdr_start). + +void +Symbol::set_undefined() +{ + gold_assert(this->is_predefined_); + this->source_ = IS_UNDEFINED; + this->is_predefined_ = false; +} + // Class Symbol_table. Symbol_table::Symbol_table(unsigned int count, |