From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 7D48C398C80F; Thu, 17 Sep 2020 16:49:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D48C398C80F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600361397; bh=TQyJc1vkdfdD4MIxpBt6H8UU9PYQet7v/LljoW77nb4=; h=From:To:Subject:Date:From; b=PYsfIBWXMs+fuGpTQf7UGPW49o/jssqkhSiCahSW07xiJNuvhfHxCjsfww2ifbzmF +IDtvQLwniNHAIJ4MdLhcIka6jOEqRH5B9/SLwqRID5sKnLRrHmecIcltp+HjIpllw KEshvQPVUbfkn7aqyIge37CloMC7nrHaqsCemL8s= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/redhat/heads/gcc-8-branch)] lto: Also copy .note.gnu.property section X-Act-Checkin: gcc X-Git-Author: H.J. Lu X-Git-Refname: refs/vendors/redhat/heads/gcc-8-branch X-Git-Oldrev: c631eeb2bafa4cc7c733987fc46ec3ec3a1aa2ce X-Git-Newrev: d205ae2694c4896ce6237f22b52355601129d718 Message-Id: <20200917164957.7D48C398C80F@sourceware.org> Date: Thu, 17 Sep 2020 16:49:57 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 16:49:57 -0000 https://gcc.gnu.org/g:d205ae2694c4896ce6237f22b52355601129d718 commit d205ae2694c4896ce6237f22b52355601129d718 Author: H.J. Lu Date: Mon Mar 2 03:08:57 2020 -0800 lto: Also copy .note.gnu.property section When generating the separate file with LTO debug sections, we should also copy .note.gnu.property section. PR lto/93966 * simple-object.c (handle_lto_debug_sections): Also copy .note.gnu.property section. (cherry picked from commit 577350603a657590c4b54a4a966cb49497e2514c) Diff: --- libiberty/ChangeLog | 9 +++++++++ libiberty/simple-object.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 227517e46c7..73e9717019c 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,12 @@ +2020-03-04 H.J. Lu + + Backport from master + 2020-03-02 H.J. Lu + + PR lto/93966 + * simple-object.c (handle_lto_debug_sections): Also copy + .note.gnu.property section. + 2020-03-04 Release Manager * GCC 8.4.0 released. diff --git a/libiberty/simple-object.c b/libiberty/simple-object.c index d2465c6e13a..d08f9c6548c 100644 --- a/libiberty/simple-object.c +++ b/libiberty/simple-object.c @@ -288,6 +288,9 @@ handle_lto_debug_sections (const char *name) /* Copy over .note.GNU-stack section under the same name if present. */ else if (strcmp (name, ".note.GNU-stack") == 0) return strcpy (newname, name); + /* Copy over .note.gnu.property section under the same name if present. */ + else if (strcmp (name, ".note.gnu.property") == 0) + return strcpy (newname, name); /* Copy over .comment section under the same name if present. Solaris ld uses them to relax its checking of ELF gABI access rules for COMDAT sections in objects produced by GCC. */