From 059f0081cf05b47d922ca698c2ba68ee63b6ee2d Mon Sep 17 00:00:00 2001 From: Siva Chandra Reddy Date: Fri, 5 Apr 2019 07:46:36 -0700 Subject: [PATCH] Use llvm-objcopy, if available, to remove the .llvm_addrsig sections. --- csu/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csu/Makefile b/csu/Makefile index 7460bcb0cf1..b0049b2ef26 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -105,6 +105,12 @@ include ../Rules # Make these in the lib pass so they're available in time to link things with. subdir_lib: $(extra-objs:%=$(objpfx)%) +ifeq ($(LLVM_OBJCOPY),) +OBJCOPY_FOR_ADDRSIG = ${OBJCOPY} +else +OBJCOPY_FOR_ADDRSIG = ${LLVM_OBJCOPY} +endif + define link-relocatable $(CC) -nostdlib -nostartfiles -r -o $@.precopy $^ # Remove a section generated by clang for safe ICF; when lld links and -- 2.47.2