aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2018-10-16 14:07:41 +1030
committerAlan Modra <amodra@gmail.com>2018-10-16 16:41:57 +1030
commit08ea4a7805705668c2c4c63b858b6641d052f7e7 (patch)
tree86672562b6b4546b66b9e2e8ba11debfa63f101a /gold/gold.cc
parent63a33118e05a84fbae40cbe3ef955b52bad359a7 (diff)
downloadgdb-08ea4a7805705668c2c4c63b858b6641d052f7e7.zip
gdb-08ea4a7805705668c2c4c63b858b6641d052f7e7.tar.gz
gdb-08ea4a7805705668c2c4c63b858b6641d052f7e7.tar.bz2
PR23769, mixing split-stack and non-split-stack error message
Corrects which file is reported as being split-stack. PR 23769 * gold.cc (queue_middle_tasks): Correct split-stack error message.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index 1987d41..7087dd4 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -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);
+ }
}
}
}