aboutsummaryrefslogtreecommitdiff
path: root/gold/output.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/output.cc')
-rw-r--r--gold/output.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/gold/output.cc b/gold/output.cc
index 7a76f79..9ec1462 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -1342,16 +1342,12 @@ Output_data_dynamic::Dynamic_entry::write(
const Stringpool* pool) const
{
typename elfcpp::Elf_types<size>::Elf_WXword val;
- switch (this->classification_)
+ switch (this->offset_)
{
case DYNAMIC_NUMBER:
val = this->u_.val;
break;
- case DYNAMIC_SECTION_ADDRESS:
- val = this->u_.od->address();
- break;
-
case DYNAMIC_SECTION_SIZE:
val = this->u_.od->data_size();
break;
@@ -1369,7 +1365,8 @@ Output_data_dynamic::Dynamic_entry::write(
break;
default:
- gold_unreachable();
+ val = this->u_.od->address() + this->offset_;
+ break;
}
elfcpp::Dyn_write<size, big_endian> dw(pov);