This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix handling of common symbols with plugins


> Thanks for mentioning tests. I decided to try to write one for gold. I
> managed to write one that passes now but fails with my patch reverted,
> but it uses readelf to check the alignment of .bss, is that OK?

+# plugin_test_6.sh -- a test case for the plugin API.
+
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Written by Cary Coutant <ccoutant@google.com>.

Update these lines.

+readelf -SW plugin_test_10 > plugin_test_10.sections
+grep ".bss.* 8$" plugin_test_10.sections > /dev/null
+
+exit 0

The readelf command should be run from the Makefile itself. Create a
new rule for plugin_test_10.sections, and use $(TEST_READELF). There
are several examples of this in testsuite/Makefile.am.

Then your test script only needs to run grep, but use grep's "-q"
option instead of "> /dev/null".

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]