]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR23769, mixing split-stack and non-split-stack error message
authorCherry Zhang <cherryyz@google.com>
Tue, 16 Oct 2018 03:37:41 +0000 (14:07 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 16 Oct 2018 06:11:57 +0000 (16:41 +1030)
Corrects which file is reported as being split-stack.

PR 23769
* gold.cc (queue_middle_tasks): Correct split-stack error message.

gold/ChangeLog
gold/gold.cc

index 8f1b02d28704ad5a122d424e1dcba4580c1359ca..9bad89b4f0afe57c20a2548c6480109d785cb9a5 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-16  Cherry Zhang  <cherryyz@google.com>
+
+       PR 23769
+       * gold.cc (queue_middle_tasks): Correct split-stack error message.
+
 2018-08-29  Chenghua Xu  <paul.hua.gm@gmail.com>
 
        * mips.cc (Mips_mach, add_machine_extensions, elf_mips_mach):
index 1987d413d3912f76ccd3295c335a65167b38ddfe..7087dd47133af131e24edead567214d2ae31a98a 100644 (file)
@@ -631,10 +631,16 @@ queue_middle_tasks(const General_options& options,
          for (++p; p != input_objects->relobj_end(); ++p)
            {
              if ((*p)->uses_split_stack() != uses_split_stack)
-               gold_fatal(_("cannot mix split-stack '%s' and "
-                            "non-split-stack '%s' when using -r"),
-                          (*input_objects->relobj_begin())->name().c_str(),
-                          (*p)->name().c_str());
+               {
+                 const char *name1
+                   = (*input_objects->relobj_begin())->name().c_str();
+                 const char *name2 = (*p)->name().c_str();
+                 const char *name_split = uses_split_stack ? name1 : name2;
+                 const char *name_nosplit = uses_split_stack ? name2 : name1;
+                 gold_fatal(_("cannot mix split-stack '%s' and "
+                              "non-split-stack '%s' when using -r"),
+                            name_split, name_nosplit);
+               }
            }
        }
     }