From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id A18463858018; Sat, 28 Aug 2021 00:41:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A18463858018 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Remove .llvm_addrsig sections from crt.o files X-Act-Checkin: glibc X-Git-Author: Stan Shebs X-Git-Refname: refs/heads/google/grte/v5-2.27/master X-Git-Oldrev: b1ecb7cf858fa28a8fc24f606d4eec89b03d545b X-Git-Newrev: c4c787ff1b1f33defe1da576fa3f83321e5c1555 Message-Id: <20210828004145.A18463858018@sourceware.org> Date: Sat, 28 Aug 2021 00:41:45 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2021 00:41:45 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c4c787ff1b1f33defe1da576fa3f83321e5c1555 commit c4c787ff1b1f33defe1da576fa3f83321e5c1555 Author: Stan Shebs Date: Wed Feb 27 14:03:33 2019 -0800 Remove .llvm_addrsig sections from crt.o files Diff: --- csu/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/csu/Makefile b/csu/Makefile index f3498960f8..7460bcb0cf 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -106,7 +106,13 @@ include ../Rules subdir_lib: $(extra-objs:%=$(objpfx)%) define link-relocatable -$(CC) -nostdlib -nostartfiles -r -o $@ $^ +$(CC) -nostdlib -nostartfiles -r -o $@.precopy $^ +# Remove a section generated by clang for safe ICF; when lld links and +# retains relocs, the section is garbled and causes errors in later +# links done with --icf=safe. The removal can be unconditional as it +# is a no-op for non-clang/lld. +$(OBJCOPY) --remove-section=.llvm_addrsig $@.precopy $@ +rm $@.precopy endef ifndef start-installed-name-rule