+// If output endianness is specified in command line, check that it does
+// not conflict with the target.
+
+void
+Parameters::check_target_endianness()
+{
+ General_options::Endianness endianness = this->options().endianness();
+ if (endianness != General_options::ENDIANNESS_NOT_SET)
+ {
+ bool big_endian;
+ if (endianness == General_options::ENDIANNESS_BIG)
+ big_endian = true;
+ else
+ {
+ gold_assert(endianness == General_options::ENDIANNESS_LITTLE);
+ big_endian = false;;
+ }
+
+ if (this->target().is_big_endian() != big_endian)
+ gold_error(_("input file does not match -EB/EL option"));
+ }
+}
+
+void
+Parameters::check_rodata_segment()
+{
+ if (this->options().user_set_Trodata_segment()
+ && !this->options().rosegment()
+ && !this->target().isolate_execinstr())
+ gold_error(_("-Trodata-segment is meaningless without --rosegment"));
+}
+
+// Return the name of the entry symbol.
+
+const char*
+Parameters::entry() const
+{
+ const char* ret = this->options().entry();
+ if (ret == NULL && parameters->target_valid())
+ ret = parameters->target().entry_symbol_name();
+ return ret;
+}
+
+// Set the incremental linking mode to INCREMENTAL_FULL. Used when
+// the linker determines that an incremental update is not possible.
+// Returns false if the incremental mode was INCREMENTAL_UPDATE,
+// indicating that the linker should exit if an update is not possible.
+
+bool
+Parameters::set_incremental_full()
+{
+ gold_assert(this->incremental_mode_ != General_options::INCREMENTAL_OFF);
+ if (this->incremental_mode_ == General_options::INCREMENTAL_UPDATE)
+ return false;
+ this->incremental_mode_ = General_options::INCREMENTAL_FULL;
+ return true;
+}
+
+// Return true if we need to prepare incremental linking information.
+
+bool
+Parameters::incremental() const
+{
+ return this->incremental_mode_ != General_options::INCREMENTAL_OFF;
+}
+
+// Return true if we are doing a full incremental link.
+
+bool
+Parameters::incremental_full() const
+{
+ return this->incremental_mode_ == General_options::INCREMENTAL_FULL;
+}
+
+// Return true if we are doing an incremental update.
+
+bool
+Parameters::incremental_update() const
+{
+ return (this->incremental_mode_ == General_options::INCREMENTAL_UPDATE
+ || this->incremental_mode_ == General_options::INCREMENTAL_AUTO);
+}
+