It makes no sense to create DSOs with empty SONAMEs. This can only create problems when trying to use those DSOs later on. So, let's just avoid creating them in the first place.
The patch below does not handle this as an error. It causes ld to print a message and then ignore the provided string. OK to check in? 2014-06-23 Ulrich Drepper <drep...@gmail.com> * lexsup.c (parse_args): Check whether provided SONAME is empty string. If yes, warn and ignore it. diff --git a/ld/lexsup.c b/ld/lexsup.c index a8c57d2..35657c0 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -1443,6 +1443,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 (); _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils