]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix incremental tests using gcc 9, which adds Gnu properties sections.
authorCary Coutant <ccoutant@gmail.com>
Sun, 13 Dec 2020 23:20:10 +0000 (15:20 -0800)
committerCary Coutant <ccoutant@gmail.com>
Sun, 13 Dec 2020 23:28:36 +0000 (15:28 -0800)
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.

gold/
PR gold/23539
* object.cc (Sized_relobj_file::layout_gnu_property_section): Ignore
Gnu properties during incremental links.

gold/ChangeLog
gold/object.cc

index bfb7a7002ac5ac25b16860cd464ca79ad3aab065..0f052cc46a3e3466b4947ab9869a0daed6ceed6c 100644 (file)
@@ -1,3 +1,9 @@
+2020-12-13  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/23539
+       * object.cc (Sized_relobj_file::layout_gnu_property_section): Ignore
+       Gnu properties during incremental links.
+
 2020-12-13  Cary Coutant  <ccoutant@gmail.com>
 
        PR gold/24123
index c0d0f0289fcbf950eaff257bc40ef373af9c41f9..23ce2064daf74cfaca39bc8a62eb3473278f489f 100644 (file)
@@ -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,