From: Filippo Valsorda Date: Sat, 6 Feb 2021 00:00:58 +0000 (+0100) Subject: [dev.boringcrypto] crypto/internal/boring: remove .llvm_addrsig section X-Git-Tag: go1.19beta1~484^2~57 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0d34d85dee216b62a4212d25de57e1119c1e7ee5;p=gostls13.git [dev.boringcrypto] crypto/internal/boring: remove .llvm_addrsig section The section doesn't survive some of the mangling of the object file we do while building it, and ld.lld --icf=safe throws a warning on it. Could have changed the clang invocation to add -fno-addrsig, but this change is safer in that it doesn't affect the FIPS module build. Change-Id: I65e097a48857f90aaa641dceb47120350ba8c073 Reviewed-on: https://go-review.googlesource.com/c/go/+/290170 Trust: Filippo Valsorda Run-TryBot: Filippo Valsorda TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor --- diff --git a/src/crypto/internal/boring/build.sh b/src/crypto/internal/boring/build.sh index ab8c45320b..31e98cb6ef 100755 --- a/src/crypto/internal/boring/build.sh +++ b/src/crypto/internal/boring/build.sh @@ -187,7 +187,8 @@ clang -c -o umod.o umod.s ld -r -nostdlib --whole-archive -o goboringcrypto.o libcrypto.a umod.o echo __umodti3 _goboringcrypto___umodti3 >>renames.txt -objcopy --redefine-syms=renames.txt goboringcrypto.o goboringcrypto2.o +objcopy --remove-section=.llvm_addrsig goboringcrypto.o goboringcrypto1.o # b/179161016 +objcopy --redefine-syms=renames.txt goboringcrypto1.o goboringcrypto2.o objcopy --keep-global-symbols=globals.txt goboringcrypto2.o goboringcrypto_linux_amd64.syso # Done! diff --git a/src/crypto/internal/boring/goboringcrypto_linux_amd64.syso b/src/crypto/internal/boring/goboringcrypto_linux_amd64.syso index ae08fcaa2f..2459dd7804 100644 Binary files a/src/crypto/internal/boring/goboringcrypto_linux_amd64.syso and b/src/crypto/internal/boring/goboringcrypto_linux_amd64.syso differ