This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold patch for fixing ICF bugs.
- From: Ian Lance Taylor <iant at google dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: binutils <binutils at sourceware dot org>, Cary Coutant <ccoutant at google dot com>
- Date: Tue, 20 Apr 2010 14:07:20 -0700
- Subject: Re: gold patch for fixing ICF bugs.
- References: <w2u863b0cbf1004181652l84316fc3zfc23bd261a0f2e3f@mail.gmail.com>
Sriraman Tallam <tmsriram@google.com> writes:
> + long long offset = it_a->first;
> +
> + unsigned long long addend = it_a->second;
> + // Ignoring the addend when it is a negative value --
> + // this is taken from function 'Value' in file 'object.h'.
> + if (addend < 0xffffff00)
> + offset = offset + it_a->second;
You can just write offset += addend.
Probably the use of "long long" in icf.h and gc.h and here should
change to int64_t. That is how most of gold deals with a large value.
That can be a separate change, though.
> +check_DATA += icf_virtual_function_folding_test.stdout
I don't see anything which creates this file. I think you need to add
it.
This is OK with the above changes, plus Cary's suggestion.
Thanks.
Ian