aboutsummaryrefslogtreecommitdiff
path: root/gold/options.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/options.cc')
-rw-r--r--gold/options.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/gold/options.cc b/gold/options.cc
index 94867b3..b13ae71 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -997,7 +997,8 @@ General_options::General_options()
fix_v4bx_(FIX_V4BX_NONE),
endianness_(ENDIANNESS_NOT_SET),
discard_locals_(DISCARD_SEC_MERGE),
- orphan_handling_enum_(ORPHAN_PLACE)
+ orphan_handling_enum_(ORPHAN_PLACE),
+ start_stop_visibility_enum_(elfcpp::STV_PROTECTED)
{
// Turn off option registration once construction is complete.
gold::options::ready_to_register = false;
@@ -1169,6 +1170,19 @@ General_options::finalize()
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);
+ }
+
// -M is equivalent to "-Map -".
if (this->print_map() && !this->user_set_Map())
{