diff options
author | Ulrich Drepper <drepper@gmail.com> | 2014-06-30 06:58:52 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2014-06-30 06:58:52 -0400 |
commit | b00548197542a46df0e46d848ac61a00827943ea (patch) | |
tree | c24b9036edcf04bb896767ad0ca0be947d1784b9 /ld/lexsup.c | |
parent | 3f201179cc5fe9c0b338fd545d26d1e2ed434f22 (diff) | |
download | fsf-binutils-gdb-b00548197542a46df0e46d848ac61a00827943ea.zip fsf-binutils-gdb-b00548197542a46df0e46d848ac61a00827943ea.tar.gz fsf-binutils-gdb-b00548197542a46df0e46d848ac61a00827943ea.tar.bz2 |
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.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r-- | ld/lexsup.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c index a8c57d2..52b4fdb 100644 --- a/ld/lexsup.c +++ b/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 (); |