- switch (this->type())
- {
- case INCREMENTAL_INPUT_OBJECT:
- case INCREMENTAL_INPUT_ARCHIVE_MEMBER:
- return Swap32::readval(this->inputs_->p_ + this->info_offset_ + 4);
- case INCREMENTAL_INPUT_SHARED_LIBRARY:
- return Swap32::readval(this->inputs_->p_ + this->info_offset_);
- default:
- gold_unreachable();
- }
+ gold_assert(this->type() == INCREMENTAL_INPUT_OBJECT
+ || this->type() == INCREMENTAL_INPUT_ARCHIVE_MEMBER
+ || this->type() == INCREMENTAL_INPUT_SHARED_LIBRARY);
+ return Swap32::readval(this->inputs_->p_ + this->info_offset_ + 4);
+ }
+
+ // Return the offset of the first local symbol -- for objects only.
+ unsigned int
+ get_local_symbol_offset() const
+ {
+ gold_assert(this->type() == INCREMENTAL_INPUT_OBJECT
+ || this->type() == INCREMENTAL_INPUT_ARCHIVE_MEMBER);
+
+ return Swap32::readval(this->inputs_->p_ + this->info_offset_ + 8);
+ }
+
+ // Return the local symbol count -- for objects only.
+ unsigned int
+ get_local_symbol_count() const
+ {
+ gold_assert(this->type() == INCREMENTAL_INPUT_OBJECT
+ || this->type() == INCREMENTAL_INPUT_ARCHIVE_MEMBER);
+
+ return Swap32::readval(this->inputs_->p_ + this->info_offset_ + 12);
+ }
+
+ // Return the index of the first dynamic relocation -- for objects only.
+ unsigned int
+ get_first_dyn_reloc() const
+ {
+ gold_assert(this->type() == INCREMENTAL_INPUT_OBJECT
+ || this->type() == INCREMENTAL_INPUT_ARCHIVE_MEMBER);
+
+ return Swap32::readval(this->inputs_->p_ + this->info_offset_ + 16);
+ }
+
+ // Return the dynamic relocation count -- for objects only.
+ unsigned int
+ get_dyn_reloc_count() const
+ {
+ gold_assert(this->type() == INCREMENTAL_INPUT_OBJECT
+ || this->type() == INCREMENTAL_INPUT_ARCHIVE_MEMBER);
+
+ return Swap32::readval(this->inputs_->p_ + this->info_offset_ + 20);
+ }
+
+ // Return the COMDAT group count -- for objects only.
+ unsigned int
+ get_comdat_group_count() const
+ {
+ gold_assert(this->type() == INCREMENTAL_INPUT_OBJECT
+ || this->type() == INCREMENTAL_INPUT_ARCHIVE_MEMBER);
+
+ return Swap32::readval(this->inputs_->p_ + this->info_offset_ + 24);