[gold patch] Fix incremental test failures with Gnu property sections
ccoutant@gmail.com
ccoutant@gmail.com
Sun Dec 13 23:33:21 GMT 2020
During an incremental link, we should simply ignore the Gnu properties
sections. We were not handling them properly -- failing to process the
properties from the base file. While that could be fixed, the property
sections are meant for deployed binaries, and incremental linking is
for development, so keeping the properties sections just adds to the
likelihood of forcing a full link sooner.
2020-12-13 Cary Coutant <ccoutant@gmail.com>
gold/
PR gold/23539
* object.cc (Sized_relobj_file::layout_gnu_property_section): Ignore
Gnu properties during incremental links.
diff --git a/gold/object.cc b/gold/object.cc
index c0d0f0289f..23ce2064da 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -1304,6 +1304,10 @@ Sized_relobj_file<size, big_endian>::layout_gnu_property_section(
Layout* layout,
unsigned int shndx)
{
+ // We ignore Gnu property sections on incremental links.
+ if (parameters->incremental())
+ return;
+
section_size_type contents_len;
const unsigned char* pcontents = this->section_contents(shndx,
&contents_len,
More information about the Binutils
mailing list