bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Empty SONAME


From: Ulrich Drepper
Subject: Empty SONAME
Date: Mon, 23 Jun 2014 07:52:08 -0400

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  <address@hidden>

        * 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 ();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]