[gold patch] Fix internal error with --start-lib and object file with no global syms

H.J. Lu hjl.tools@gmail.com
Fri Aug 27 16:32:00 GMT 2010


On Mon, Aug 23, 2010 at 11:23 AM, Cary Coutant <ccoutant@google.com> wrote:
> If gold encounters an object file between --start-lib and --end-lib
> that has no global symbols, it will trigger an assertion failure due
> to a failure to lock the file before destroying the views in that
> file. This patch fixes that problem and tweaks the --start-lib test
> case to trigger the problem.
>
> OK?
>
> -cary
>
>        * archive.cc (Lib_group::add_symbols): Lock object before deleting its
>        symbols data.
>        (Lib_group::include_member): Unlock object after deleting its
>        symbols data.
>        * testsuite/start_lib_test_3.c: Remove all global symbols to trigger
>        the bug fixed here.
>

Hi Cary,

Your patch changed testsuite/start_lib_test_3.c to

static char t3[] = "t3";

I got

cc1: warnings being treated as errors
/net/gnu-6/export/linux/src/binutils/binutils/gold/testsuite/start_lib_test_3.c:25:
warning: ‘t3’ defined but not used

and this test failed.


-- 
H.J.



More information about the Binutils mailing list