+ // Parse the --orphan-handling argument.
+ if (this->user_set_orphan_handling())
+ {
+ if (strcmp(this->orphan_handling(), "place") == 0)
+ this->set_orphan_handling_enum(ORPHAN_PLACE);
+ else if (strcmp(this->orphan_handling(), "discard") == 0)
+ this->set_orphan_handling_enum(ORPHAN_DISCARD);
+ else if (strcmp(this->orphan_handling(), "warn") == 0)
+ this->set_orphan_handling_enum(ORPHAN_WARN);
+ else if (strcmp(this->orphan_handling(), "error") == 0)
+ this->set_orphan_handling_enum(ORPHAN_ERROR);
+ }
+
+ // Parse the -z start-stop-visibility argument.
+ if (this->user_set_start_stop_visibility())
+ {
+ if (strcmp(this->start_stop_visibility(), "default") == 0)
+ this->set_start_stop_visibility_enum(elfcpp::STV_DEFAULT);
+ else if (strcmp(this->start_stop_visibility(), "internal") == 0)
+ this->set_start_stop_visibility_enum(elfcpp::STV_INTERNAL);
+ else if (strcmp(this->start_stop_visibility(), "hidden") == 0)
+ this->set_start_stop_visibility_enum(elfcpp::STV_HIDDEN);
+ else if (strcmp(this->start_stop_visibility(), "protected") == 0)
+ this->set_start_stop_visibility_enum(elfcpp::STV_PROTECTED);
+ }
+
+ // Parse the --power10-stubs argument.
+ if (!this->user_set_power10_stubs())
+ {
+ // --power10-stubs without an arg is equivalent to --power10-stubs=yes
+ // but not specifying --power10-stubs at all should be equivalent to
+ // --power10-stubs=auto. This doesn't fit into the notion of
+ // "default_value", used both as a static initializer and to provide
+ // a missing optional arg. Fix it here.
+ this->set_power10_stubs("auto");
+ this->set_power10_stubs_enum(POWER10_STUBS_AUTO);
+ }
+ else
+ {
+ if (strcmp(this->power10_stubs(), "auto") == 0)
+ this->set_power10_stubs_enum(POWER10_STUBS_AUTO);
+ else if (strcmp(this->power10_stubs(), "no") == 0)
+ this->set_power10_stubs_enum(POWER10_STUBS_NO);
+ else if (strcmp(this->power10_stubs(), "yes") == 0)
+ this->set_power10_stubs_enum(POWER10_STUBS_YES);
+ }
+
+ // -M is equivalent to "-Map -".
+ if (this->print_map() && !this->user_set_Map())
+ {
+ this->set_Map("-");
+ this->set_user_set_Map();
+ }
+
+ // Using -n or -N implies -static.
+ if (this->nmagic() || this->omagic())
+ this->set_static(true);
+