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: [gold patch] Fix internal error with --start-lib and object file with no global syms


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.


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