? NULL
: this->plt_->rela_plt());
layout->add_target_dynamic_tags(false, this->got_plt_, rel_plt,
- this->rela_dyn_, true, false);
+ this->rela_dyn_, true, false, false);
// Emit any relocs we saved in an attempt to avoid generating COPY
// relocs.
? NULL
: this->plt_->rel_plt());
layout->add_target_dynamic_tags(true, this->got_plt_, rel_plt,
- this->rel_dyn_, true, false);
+ this->rel_dyn_, true, false, false);
// Emit any relocs we saved in an attempt to avoid generating COPY
// relocs.
? NULL
: this->plt_->rel_plt());
layout->add_target_dynamic_tags(true, this->got_plt_, rel_plt,
- this->rel_dyn_, true, false);
+ this->rel_dyn_, true, false, false);
// Emit any relocs we saved in an attempt to avoid generating COPY
// relocs.
Layout::add_target_dynamic_tags(bool use_rel, const Output_data* plt_got,
const Output_data* plt_rel,
const Output_data_reloc_generic* dyn_rel,
- bool add_debug, bool dynrel_includes_plt)
+ bool add_debug, bool dynrel_includes_plt,
+ bool custom_relcount)
{
Output_data_dynamic* odyn = this->dynamic_data_;
if (odyn == NULL)
if (parameters->options().combreloc() && have_dyn_rel)
{
size_t c = dyn_rel->relative_reloc_count();
- if (c > 0)
- odyn->add_constant((use_rel
- ? elfcpp::DT_RELCOUNT
- : elfcpp::DT_RELACOUNT),
- c);
+ if (c != 0)
+ {
+ elfcpp::DT tag
+ = use_rel ? elfcpp::DT_RELCOUNT : elfcpp::DT_RELACOUNT;
+ if (custom_relcount)
+ odyn->add_custom(tag);
+ else
+ odyn->add_constant(tag, c);
+ }
}
}
add_target_dynamic_tags(bool use_rel, const Output_data* plt_got,
const Output_data* plt_rel,
const Output_data_reloc_generic* dyn_rel,
- bool add_debug, bool dynrel_includes_plt);
+ bool add_debug, bool dynrel_includes_plt,
+ bool custom_relcount);
// Add a target-specific dynamic tag with constant value.
void
const Reloc_section* rel_plt = (this->plt_ == NULL
? NULL : this->plt_->rel_plt());
layout->add_target_dynamic_tags(true, this->got_, rel_plt,
- this->rel_dyn_, true, false);
+ this->rel_dyn_, true, false, false);
Output_data_dynamic* const odyn = layout->dynamic_data();
if (odyn != NULL
void
do_finalize_sections(Layout*, const Input_objects*, Symbol_table*);
+ // Get the custom dynamic tag value.
+ unsigned int
+ do_dynamic_tag_custom_value(elfcpp::DT) const;
+
// Return the value to use for a dynamic which requires special
// treatment.
uint64_t
? NULL
: this->plt_->rel_plt());
layout->add_target_dynamic_tags(false, this->plt_, rel_plt,
- this->rela_dyn_, true, size == 32);
+ this->rela_dyn_, true, size == 32, true);
if (size == 32)
{
}
}
+// Get the custom dynamic tag value.
+
+template<int size, bool big_endian>
+unsigned int
+Target_powerpc<size, big_endian>::do_dynamic_tag_custom_value(
+ elfcpp::DT tag) const
+{
+ if (tag != elfcpp::DT_RELACOUNT)
+ gold_unreachable();
+ return this->rela_dyn_->relative_reloc_count();
+}
+
// Merge object attributes from input file called NAME with those of the
// output. The input object attributes are in the object pointed by PASD.
? NULL
: this->plt_->rela_plt());
layout->add_target_dynamic_tags(false, this->got_plt_, rel_plt,
- this->rela_dyn_, true, size == 32);
+ this->rela_dyn_, true, size == 32, false);
this->layout_ = layout;
? NULL
: this->plt_->rel_plt());
layout->add_target_dynamic_tags(false, this->plt_, rel_plt,
- this->rela_dyn_, true, true);
+ this->rela_dyn_, true, true, false);
// Emit any relocs we saved in an attempt to avoid generating COPY
// relocs.
? NULL
: this->plt_->rela_plt());
layout->add_target_dynamic_tags(false, this->got_plt_, rel_plt,
- this->rela_dyn_, true, true);
+ this->rela_dyn_, true, true, false);
// Emit any relocs we saved in an attempt to avoid generating COPY
// relocs.
? NULL
: this->plt_->rela_plt());
layout->add_target_dynamic_tags(false, this->got_plt_, rel_plt,
- this->rela_dyn_, true, false);
+ this->rela_dyn_, true, false, false);
// Fill in some more dynamic tags.
Output_data_dynamic* const odyn = layout->dynamic_data();