From 08ea4a7805705668c2c4c63b858b6641d052f7e7 Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Tue, 16 Oct 2018 14:07:41 +1030 Subject: 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. --- gold/ChangeLog | 5 +++++ gold/gold.cc | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'gold') diff --git a/gold/ChangeLog b/gold/ChangeLog index 8f1b02d..9bad89b 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2018-10-16 Cherry Zhang + + PR 23769 + * gold.cc (queue_middle_tasks): Correct split-stack error message. + 2018-08-29 Chenghua Xu * mips.cc (Mips_mach, add_machine_extensions, elf_mips_mach): 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); + } } } } -- cgit v1.1