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]

[gold patch] Fix incremental update with comdat sections


During an incremental update, gold is failing to record the comdat
keys for kept comdat groups in unchanged files. This leads to an
internal error in a subsequent incremental update if a changed file
contains a copy of a comdat group that is still in the base file from
an unchanged file, and the group contains a non-weak definitions (such
as an STB_GNU_UNIQUE symbol).

The attached patch adds a test case and fixes the problem. OK to commit?

-cary


	* incremental.cc (Sized_relobj_incr::do_layout): Call
	report_comdat_group for kept comdat sections.
	* testsuite/Makefile.am (incremental_comdat_test_1): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/incr_comdat_test_1.cc: New source file.
	* testsuite/incr_comdat_test_2_v1.cc: New source file.
	* testsuite/incr_comdat_test_2_v2.cc: New source file.
	* testsuite/incr_comdat_test_2_v3.cc: New source file.

Attachment: incr-comdat-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]