mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
lexsup.c (parse_args): Check whether provided SONAME is empty
string. If yes, warn and ignore it. Don't overwrite valid SONAME with empty string.
This commit is contained in:
parent
3f201179cc
commit
b005481975
@ -1,3 +1,9 @@
|
||||
2014-06-30 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* lexsup.c (parse_args): Check whether provided SONAME is empty
|
||||
string. If yes, warn and ignore it. Don't overwrite valid SONAME
|
||||
with empty string.
|
||||
|
||||
2014-06-26 Linda Zhang <lindasc@qq.com>
|
||||
|
||||
* emultempl/pe.em: Initialise insert_timestamp to true.
|
||||
|
12
ld/lexsup.c
12
ld/lexsup.c
@ -1107,7 +1107,11 @@ parse_args (unsigned argc, char **argv)
|
||||
break;
|
||||
case 'h': /* Used on Solaris. */
|
||||
case OPTION_SONAME:
|
||||
command_line.soname = optarg;
|
||||
if (optarg[0] == '\0' && command_line.soname
|
||||
&& command_line.soname[0])
|
||||
einfo (_("%P: SONAME must not be empty string; keeping previous one\n"));
|
||||
else
|
||||
command_line.soname = optarg;
|
||||
break;
|
||||
case OPTION_SORT_COMMON:
|
||||
if (optarg == NULL
|
||||
@ -1443,6 +1447,12 @@ parse_args (unsigned argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (command_line.soname && command_line.soname[0] == '\0')
|
||||
{
|
||||
einfo (_("%P: SONAME must not be empty string; ignored\n"));
|
||||
command_line.soname = NULL;
|
||||
}
|
||||
|
||||
while (ingroup)
|
||||
{
|
||||
lang_leave_group ();
|
||||
|
Loading…
Reference in New Issue
Block a user