From patchwork Tue Mar 10 10:31:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 39020 From: gprocida@google.com (Giuliano Procida) Date: Tue, 10 Mar 2020 10:31:13 +0000 Subject: [PATCH] [abisym] Remove leading space in output. Message-ID: <20200310103113.54010-1-gprocida@google.com> When abisym reports a symbol as found, it currently emits a leading space. It does not do this when reporting a symbol as not found. This patch removes the leading space. * tools/abisym.cc (main): Remove leading space from output. * tests/data/test-lookup-syms/test0-report.txt: Remove leading space from expected output. * tests/data/test-lookup-syms/test01-report.txt: Ditto. * tests/data/test-lookup-syms/test02-report.txt: Ditto. * tests/data/test-lookup-syms/test1-1-report.txt: Ditto. Signed-off-by: Giuliano Procida Reviewed-by: Matthias Maennich --- tests/data/test-lookup-syms/test0-report.txt | 2 +- tests/data/test-lookup-syms/test01-report.txt | 2 +- tests/data/test-lookup-syms/test02-report.txt | 2 +- tests/data/test-lookup-syms/test1-1-report.txt | 2 +- tools/abisym.cc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/data/test-lookup-syms/test0-report.txt b/tests/data/test-lookup-syms/test0-report.txt index 51042d4a..2806123f 100644 --- a/tests/data/test-lookup-syms/test0-report.txt +++ b/tests/data/test-lookup-syms/test0-report.txt @@ -1 +1 @@ - found symbol 'main', an instance of function symbol type of global binding +found symbol 'main', an instance of function symbol type of global binding diff --git a/tests/data/test-lookup-syms/test01-report.txt b/tests/data/test-lookup-syms/test01-report.txt index ba8f909e..ce80129e 100644 --- a/tests/data/test-lookup-syms/test01-report.txt +++ b/tests/data/test-lookup-syms/test01-report.txt @@ -1 +1 @@ - found symbol 'foo', an instance of function symbol type of global binding +found symbol 'foo', an instance of function symbol type of global binding diff --git a/tests/data/test-lookup-syms/test02-report.txt b/tests/data/test-lookup-syms/test02-report.txt index b374d17e..d5e29945 100644 --- a/tests/data/test-lookup-syms/test02-report.txt +++ b/tests/data/test-lookup-syms/test02-report.txt @@ -1 +1 @@ - found symbol 'bar(char)' (_Z3barc), an instance of function symbol type of global binding +found symbol 'bar(char)' (_Z3barc), an instance of function symbol type of global binding diff --git a/tests/data/test-lookup-syms/test1-1-report.txt b/tests/data/test-lookup-syms/test1-1-report.txt index 15a3d416..2904c6d2 100644 --- a/tests/data/test-lookup-syms/test1-1-report.txt +++ b/tests/data/test-lookup-syms/test1-1-report.txt @@ -1 +1 @@ - found symbol 'foo', an instance of function symbol type of global binding, of versions 'VERSION_2.0', 'VERSION_1.0' +found symbol 'foo', an instance of function symbol type of global binding, of versions 'VERSION_2.0', 'VERSION_1.0' diff --git a/tools/abisym.cc b/tools/abisym.cc index da24f72a..2da45b41 100644 --- a/tools/abisym.cc +++ b/tools/abisym.cc @@ -159,7 +159,7 @@ main(int argc, char* argv[]) } elf_symbol_sptr sym = syms[0]; - cout << " found symbol '" << n << "'"; + cout << "found symbol '" << n << "'"; if (n != sym->get_name()) cout << " (" << sym->get_name() << ")"; cout << ", an instance of "