Blame SOURCES/binutils-rh1128280.patch

881b8e
commit b00548197542a46df0e46d848ac61a00827943ea
881b8e
Author: Ulrich Drepper <drepper@gmail.com>
881b8e
Date:   Mon Jun 30 06:58:52 2014 -0400
881b8e
881b8e
        lexsup.c (parse_args): Check whether provided SONAME is empty
881b8e
        string.  If yes, warn and ignore it.  Don't overwrite valid SONAME
881b8e
        with empty string.
881b8e
881b8e
 
881b8e
--- a/ld/lexsup.c	2013-02-27 13:28:03.000000000 -0700
881b8e
+++ b/ld/lexsup.c	2014-08-12 13:44:20.501609403 -0600
881b8e
@@ -1110,7 +1110,11 @@ parse_args (unsigned argc, char **argv)
881b8e
 	  break;
881b8e
 	case 'h':		/* Used on Solaris.  */
881b8e
 	case OPTION_SONAME:
881b8e
-	  command_line.soname = optarg;
881b8e
+	  if (optarg[0] == '\0' && command_line.soname
881b8e
+	      && command_line.soname[0])
881b8e
+	    einfo (_("%P: SONAME must not be empty string; keeping previous one\n"));
881b8e
+	  else
881b8e
+	    command_line.soname = optarg;
881b8e
 	  break;
881b8e
 	case OPTION_SORT_COMMON:
881b8e
 	  if (optarg == NULL
881b8e
@@ -1446,6 +1450,12 @@ parse_args (unsigned argc, char **argv)
881b8e
 	}
881b8e
     }
881b8e
 
881b8e
+  if (command_line.soname && command_line.soname[0] == '\0')
881b8e
+    {
881b8e
+      einfo (_("%P: SONAME must not be empty string; ignored\n"));
881b8e
+      command_line.soname = NULL;
881b8e
+    }
881b8e
+
881b8e
   while (ingroup)
881b8e
     {
881b8e
       lang_leave_group ();