aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-01-14 04:36:35 +0000
committerAlan Modra <amodra@gmail.com>2001-01-14 04:36:35 +0000
commit577a062318714628709c41467904c0cb7b212f94 (patch)
treefe95014262d6fb594ac3cf4858c44773f19e1079 /ld/lexsup.c
parentb9d79e0379726fd6d072b987a30f3f8bed4985e4 (diff)
downloadgdb-577a062318714628709c41467904c0cb7b212f94.zip
gdb-577a062318714628709c41467904c0cb7b212f94.tar.gz
gdb-577a062318714628709c41467904c0cb7b212f94.tar.bz2
Extend "ld --unique" functionality.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 51ffc44..f9ef805 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -236,8 +236,8 @@ static const struct ld_option ld_options[] =
'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
{ {"undefined", required_argument, NULL, 'u'},
'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"), TWO_DASHES },
- { {"unique", no_argument, NULL, OPTION_UNIQUE},
- '\0', NULL, N_("Don't merge orphan sections with the same name"), TWO_DASHES },
+ { {"unique", optional_argument, NULL, OPTION_UNIQUE},
+ '\0', N_("[=SECTION]"), N_("Don't merge input [SECTION | orphan] sections"), TWO_DASHES },
{ {"Ur", no_argument, NULL, OPTION_UR},
'\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
{ {"version", no_argument, NULL, OPTION_VERSION},
@@ -965,7 +965,10 @@ parse_args (argc, argv)
ldlang_add_undef (optarg);
break;
case OPTION_UNIQUE:
- config.unique_orphan_sections = true;
+ if (optarg != NULL)
+ lang_add_unique (optarg);
+ else
+ config.unique_orphan_sections = true;
break;
case OPTION_VERBOSE:
ldversion (1);