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 for fixing ICF bugs.


Thanks.

I committed the patch with those changes.

2010-04-18  Sriraman Tallam  <tmsriram@google.com>

	* icf.cc (get_section_contents): Check for preemptible functions.
	Ignore addend when appropriate.
	* symtab.cc (should_add_dynsym_entry): Add new parameter.  Check for
	section folded.
	(add_from_relobj): Check for section folded.
	(set_dynsym_indexes): Fix call to should_add_dynsym_entry.
	* symtab.h (should_add_dynsym_entry): Add new parameter.
	* target-reloc.h (scan_relocs): Check for section folded.
	* x86_64.cc (Target_x86_64::Scan::possible_function_pointer_reloc):
	Check reloc types for function pointers in shared objects.
	* testsuite/Makefile.am (icf_virtual_function_folding_test): New test
	case.
	(icf_preemptible_functions_test): New test case.
	(icf_string_merge_test): New test case.
	* testsuite.Makefile.in: Regenerate.
	* testsuite/icf_safe_so_test.sh: Change to not fold foo_glob and
	bar_glob.  Refactor code.
	* testsuite/icf_preemptible_functions_test.cc: New file.
	* testsuite/icf_preemptible_functions_test.sh: New file.
	* testsuite/icf_string_merge_test.cc: New file.
	* testsuite/icf_string_merge_test.sh: New file.
	* testsuite/icf_virtual_function_folding_test.cc: New file.
	* testsuite/icf_virtual_function_folding_test.sh: New file.



On Tue, Apr 20, 2010 at 2:07 PM, Ian Lance Taylor <iant@google.com> wrote:
> 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
>

Attachment: icf_bug_fixes_patch.txt
Description: Text document


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